ariankhalfani commited on
Commit
0bbf8d8
1 Parent(s): 9a6086b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -223,13 +223,15 @@ with gr.Blocks() as demo:
223
  download_uploaded_btn = gr.Button("Download Uploaded Images")
224
  download_predicted_btn = gr.Button("Download Predicted Images")
225
 
226
- # Add a file download output component
227
  patient_info_file = gr.File(label="Patient Information HTML File")
 
 
228
 
229
  submit_btn.click(fn=interface, inputs=[name, age, medical_record, sex, input_image], outputs=[output_image, raw_result])
230
  download_html_btn.click(fn=save_patient_info_to_html, inputs=[name, age, medical_record, sex, raw_result], outputs=patient_info_file)
231
- download_uploaded_btn.click(fn=download_uploaded_folder, outputs="file")
232
- download_predicted_btn.click(fn=download_predicted_folder, outputs="file")
233
 
234
  # Launch Gradio app
235
  demo.launch()
 
223
  download_uploaded_btn = gr.Button("Download Uploaded Images")
224
  download_predicted_btn = gr.Button("Download Predicted Images")
225
 
226
+ # Add file download output components for the uploaded and predicted images
227
  patient_info_file = gr.File(label="Patient Information HTML File")
228
+ uploaded_folder_file = gr.File(label="Uploaded Images Zip File")
229
+ predicted_folder_file = gr.File(label="Predicted Images Zip File")
230
 
231
  submit_btn.click(fn=interface, inputs=[name, age, medical_record, sex, input_image], outputs=[output_image, raw_result])
232
  download_html_btn.click(fn=save_patient_info_to_html, inputs=[name, age, medical_record, sex, raw_result], outputs=patient_info_file)
233
+ download_uploaded_btn.click(fn=download_uploaded_folder, outputs=uploaded_folder_file)
234
+ download_predicted_btn.click(fn=download_predicted_folder, outputs=predicted_folder_file)
235
 
236
  # Launch Gradio app
237
  demo.launch()