Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -267,7 +267,8 @@ def classify_images(files,threshold):
267
 
268
  import shutil
269
 
270
- def upload_file(files):
 
271
  delete_folder(test_path)
272
  file_paths = []
273
  for file in files:
@@ -308,7 +309,7 @@ with gr.Blocks() as fungus_classification:
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")
311
- upload_button.upload(upload_file, upload_button, image_output)
312
  upload_button.upload(classify_images, [upload_button,threshold], predict_outputs)
 
313
  # fungus_classification.launch(share=True, debug=True, enable_queue=True)
314
- fungus_classification.launch(share=True, debug=True)
 
267
 
268
  import shutil
269
 
270
+ def upload_file(filesthreshold):
271
+ print(f'threshold = {threshold}')
272
  delete_folder(test_path)
273
  file_paths = []
274
  for file in files:
 
309
  image_output = gr.Gallery(label = 'Images of Molds')
310
  predict_outputs = gr.Textbox(label = 'Prediction Result')
311
  upload_button = gr.UploadButton("Click to Upload Files", file_types=["image", "video"], file_count="multiple")
312
+ upload_button.upload(upload_file, [upload_button,threshold], image_output)
313
  upload_button.upload(classify_images, [upload_button,threshold], predict_outputs)
314
+ fungus_classification.launch(share=True, debug=True)
315
  # fungus_classification.launch(share=True, debug=True, enable_queue=True)