tnt306 commited on
Commit
6cbef49
·
1 Parent(s): 9cdcb63
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -56,13 +56,13 @@ with gr.Blocks() as demo:
56
  with gr.Row():
57
  with gr.Column(min_width=100):
58
  patient_1_input_btn = gr.Button("Patient 1")
59
- patient_1_download_btn = gr.DownloadButton(label="Download 1", value="1")
60
  with gr.Column(min_width=100):
61
  patient_2_input_btn = gr.Button("Patient 2")
62
- patient_2_download_btn = gr.DownloadButton(label="Download 2",value="2")
63
  with gr.Column(min_width=100):
64
  patient_3_input_btn = gr.Button("Patient 3")
65
- patient_3_download_btn = gr.DownloadButton(label="Download 3", value="3")
66
  with gr.Column():
67
  result = gr.Label(num_top_classes=2, label="Predictions")
68
 
@@ -70,9 +70,9 @@ with gr.Blocks() as demo:
70
  patient_1_input_btn.click(fn=predict, inputs=None, outputs=result, api_name="predict")
71
 
72
  # Download a patient ehr profile.
73
- patient_1_download_btn.click(fn=download_patient, inputs=[patient_1_download_btn], outputs=[patient_1_download_btn])
74
- patient_2_download_btn.click(fn=download_patient, inputs=[patient_2_download_btn], outputs=[patient_2_download_btn])
75
- patient_3_download_btn.click(fn=download_patient, inputs=[patient_3_download_btn], outputs=[patient_3_download_btn])
76
 
77
 
78
  demo.launch(debug=True)
 
56
  with gr.Row():
57
  with gr.Column(min_width=100):
58
  patient_1_input_btn = gr.Button("Patient 1")
59
+ patient_1_download_btn = gr.DownloadButton(label="Download 1", value="Patient1.csv")
60
  with gr.Column(min_width=100):
61
  patient_2_input_btn = gr.Button("Patient 2")
62
+ patient_2_download_btn = gr.DownloadButton(label="Download 2", value="Patient2.csv")
63
  with gr.Column(min_width=100):
64
  patient_3_input_btn = gr.Button("Patient 3")
65
+ patient_3_download_btn = gr.DownloadButton(label="Download 3", value="Patient3.csv")
66
  with gr.Column():
67
  result = gr.Label(num_top_classes=2, label="Predictions")
68
 
 
70
  patient_1_input_btn.click(fn=predict, inputs=None, outputs=result, api_name="predict")
71
 
72
  # Download a patient ehr profile.
73
+ # patient_1_download_btn.click(fn=download_patient, inputs=patient_1_download_btn, outputs=patient_1_download_btn)
74
+ # patient_2_download_btn.click(fn=download_patient, inputs=patient_2_download_btn, outputs=patient_2_download_btn)
75
+ # patient_3_download_btn.click(fn=download_patient, inputs=patient_3_download_btn, outputs=patient_3_download_btn)
76
 
77
 
78
  demo.launch(debug=True)