kcelia commited on
Commit
f83ba08
β€’
1 Parent(s): e8839a5

chore: desable some buttons

Browse files
Files changed (1) hide show
  1. app.py +8 -11
app.py CHANGED
@@ -467,7 +467,7 @@ def reset_fn():
467
 
468
  return {
469
  user_vect_box2: None,
470
- submit_button: gr.update(value="Confirm Symptoms"),
471
  user_id_box: gr.update(visible=False, value=None, interactive=False),
472
  user_vect_box1: None,
473
  default_symptoms: gr.update(visible=True, value=None),
@@ -579,27 +579,24 @@ if __name__ == "__main__":
579
  error_box1 = gr.Textbox(label="Error ❌", visible=False)
580
 
581
  # Default disease, picked from the dataframe
582
- gr.Markdown("You can choose an **existing disease** and explore its associated symptoms.")
583
 
584
  with gr.Row():
585
  with gr.Column(scale=2):
586
- disease_box = gr.Dropdown(sorted(diseases), label="Diseases")
587
  with gr.Column(scale=5):
588
  default_symptoms = gr.Textbox(
589
- label="Related Symptoms:", visible=True, interactive=False
590
  )
591
 
592
  disease_box.change(fn=display_default_symptoms_fn, inputs=[disease_box], outputs=[default_symptoms])
593
 
594
  user_vect_box1 = gr.Textbox(visible=False)
595
 
596
- with gr.Row():
597
- with gr.Column():
598
- # Submit botton
599
- submit_button = gr.Button("Submit Symptoms")
600
- with gr.Column():
601
- # Clear botton
602
- clear_button = gr.Button("Reset Space πŸ” ↻")
603
 
604
  # ------------------------- Step 2 -------------------------
605
  gr.Markdown("## Step 2: Encrypt data")
 
467
 
468
  return {
469
  user_vect_box2: None,
470
+ submit_button: gr.update(value="Submit Symptoms"),
471
  user_id_box: gr.update(visible=False, value=None, interactive=False),
472
  user_vect_box1: None,
473
  default_symptoms: gr.update(visible=True, value=None),
 
579
  error_box1 = gr.Textbox(label="Error ❌", visible=False)
580
 
581
  # Default disease, picked from the dataframe
582
+ gr.Markdown("You can choose an **existing disease** and explore its associated symptoms.", visible=False)
583
 
584
  with gr.Row():
585
  with gr.Column(scale=2):
586
+ disease_box = gr.Dropdown(sorted(diseases), label="Diseases", visible=False)
587
  with gr.Column(scale=5):
588
  default_symptoms = gr.Textbox(
589
+ label="Related Symptoms:", interactive=False, visible=False,
590
  )
591
 
592
  disease_box.change(fn=display_default_symptoms_fn, inputs=[disease_box], outputs=[default_symptoms])
593
 
594
  user_vect_box1 = gr.Textbox(visible=False)
595
 
596
+ # Submit botton
597
+ submit_button = gr.Button("Submit Symptoms")
598
+ # Clear botton
599
+ clear_button = gr.Button("Reset Space πŸ” ↻", visible=False)
 
 
 
600
 
601
  # ------------------------- Step 2 -------------------------
602
  gr.Markdown("## Step 2: Encrypt data")