Spaces:
Sleeping
Sleeping
Arifin commited on
Commit ·
82ac5b6
1
Parent(s): 33e65f8
rekomendasi
Browse files
app.py
CHANGED
|
@@ -75,16 +75,14 @@ def url_infer_and_calculate(url, location, unit="pixels", conversion_factor=1, c
|
|
| 75 |
df.to_csv('Corrosion_Report.csv', index=False)
|
| 76 |
|
| 77 |
# Add the new inputs to the result
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
return img, corrosion_areas, prediction_json, os.path.abspath('Corrosion_Report.csv'), result
|
| 85 |
|
| 86 |
# Return the path of the CSV file along with other outputs.
|
| 87 |
-
|
| 88 |
|
| 89 |
except Exception as e:
|
| 90 |
return {"error": str(e)}
|
|
@@ -109,4 +107,4 @@ iface = gr.Interface(
|
|
| 109 |
)
|
| 110 |
|
| 111 |
# Launch the Gradio interface
|
| 112 |
-
iface.launch(debug=False, share=False)
|
|
|
|
| 75 |
df.to_csv('Corrosion_Report.csv', index=False)
|
| 76 |
|
| 77 |
# Add the new inputs to the result
|
| 78 |
+
result["corrosion_type"] = corrosion_type
|
| 79 |
+
result["inspection_standards"] = inspection_standards
|
| 80 |
+
result["ndt_methods"] = ndt_methods
|
| 81 |
+
result["manual_recommendation"] = recommendation
|
| 82 |
+
result["files"] = [f.name for f in files]
|
|
|
|
|
|
|
| 83 |
|
| 84 |
# Return the path of the CSV file along with other outputs.
|
| 85 |
+
return img, corrosion_areas, prediction_json, os.path.abspath('Corrosion_Report.csv'), result
|
| 86 |
|
| 87 |
except Exception as e:
|
| 88 |
return {"error": str(e)}
|
|
|
|
| 107 |
)
|
| 108 |
|
| 109 |
# Launch the Gradio interface
|
| 110 |
+
iface.launch(debug=False, share=False)
|