remove dublicate buttons
Browse files
app.py
CHANGED
|
@@ -38,6 +38,9 @@ model2.compile()
|
|
| 38 |
## Function to do the actual damage classification
|
| 39 |
##
|
| 40 |
def damage_classification(SEM_image,image_threshold, model1_threshold, model2_threshold):
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
damage_sites = {}
|
| 43 |
##
|
|
@@ -167,12 +170,13 @@ with gr.Blocks() as app:
|
|
| 167 |
button = gr.Button("Classify")
|
| 168 |
output_image = gr.Image()
|
| 169 |
|
| 170 |
-
|
| 171 |
-
download_csv_btn = gr.DownloadButton(label="Download Damage List")
|
| 172 |
|
| 173 |
with gr.Row():
|
| 174 |
-
download_image = gr.DownloadButton(label='Download Image')
|
| 175 |
-
download_csv = gr.DownloadButton(label='Download Damage List')
|
|
|
|
|
|
|
| 176 |
#download_image = gr.File(label='Download Image',interactive=False)
|
| 177 |
#download_csv = gr.File(label='Download Damage List',interactive=False)
|
| 178 |
|
|
|
|
| 38 |
## Function to do the actual damage classification
|
| 39 |
##
|
| 40 |
def damage_classification(SEM_image,image_threshold, model1_threshold, model2_threshold):
|
| 41 |
+
if SEM_image is None:
|
| 42 |
+
logging.error('No image provided')
|
| 43 |
+
return None
|
| 44 |
|
| 45 |
damage_sites = {}
|
| 46 |
##
|
|
|
|
| 170 |
button = gr.Button("Classify")
|
| 171 |
output_image = gr.Image()
|
| 172 |
|
| 173 |
+
|
|
|
|
| 174 |
|
| 175 |
with gr.Row():
|
| 176 |
+
#download_image = gr.DownloadButton(label='Download Image')
|
| 177 |
+
#download_csv = gr.DownloadButton(label='Download Damage List')
|
| 178 |
+
download_image_btn = gr.DownloadButton(label="Download Image")
|
| 179 |
+
download_csv_btn = gr.DownloadButton(label="Download Damage List")
|
| 180 |
#download_image = gr.File(label='Download Image',interactive=False)
|
| 181 |
#download_csv = gr.File(label='Download Damage List',interactive=False)
|
| 182 |
|