Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -255,6 +255,7 @@ def Aspergillus_Detect():
|
|
| 255 |
"""# classify images: genus and Aspergillus"""
|
| 256 |
|
| 257 |
def classify_images(files):
|
|
|
|
| 258 |
predict, result1 = genus_classify_images(files)
|
| 259 |
# # 列出工作目录及其子目录下的所有文件
|
| 260 |
# all_files = get_all_files(working_directory)
|
|
@@ -303,6 +304,7 @@ def delete_folder(directory_path):
|
|
| 303 |
|
| 304 |
threshold = 0.6
|
| 305 |
with gr.Blocks() as fungus_classification:
|
|
|
|
| 306 |
image_output = gr.Gallery(label = 'Images of Molds')
|
| 307 |
predict_outputs = gr.Textbox(label = 'Prediction Result')
|
| 308 |
upload_button = gr.UploadButton("Click to Upload Files", file_types=["image", "video"], file_count="multiple")
|
|
|
|
| 255 |
"""# classify images: genus and Aspergillus"""
|
| 256 |
|
| 257 |
def classify_images(files):
|
| 258 |
+
print(f'threshold = {threshold}')
|
| 259 |
predict, result1 = genus_classify_images(files)
|
| 260 |
# # 列出工作目录及其子目录下的所有文件
|
| 261 |
# all_files = get_all_files(working_directory)
|
|
|
|
| 304 |
|
| 305 |
threshold = 0.6
|
| 306 |
with gr.Blocks() as fungus_classification:
|
| 307 |
+
threshold = gr.Slider(minimum=0.1, maximum=1, step=0.1, value=0.6, label="Threshold")
|
| 308 |
image_output = gr.Gallery(label = 'Images of Molds')
|
| 309 |
predict_outputs = gr.Textbox(label = 'Prediction Result')
|
| 310 |
upload_button = gr.UploadButton("Click to Upload Files", file_types=["image", "video"], file_count="multiple")
|