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

chore: update

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -124,7 +124,7 @@ def get_features_fn(*checked_symptoms: Tuple[str]) -> Dict:
124
  visible=False,
125
  value=get_user_symptoms_from_checkboxgroup(pretty_print(checked_symptoms)),
126
  ),
127
- submit_button: gr.update(value="Data Submitted βœ…"),
128
  }
129
 
130
 
@@ -457,6 +457,7 @@ def decrypt_fn(
457
  return {
458
  error_box7: gr.update(visible=False),
459
  decrypt_target_box: out,
 
460
  }
461
 
462
 
@@ -467,7 +468,7 @@ def reset_fn():
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),
@@ -555,7 +556,7 @@ if __name__ == "__main__":
555
  "## Step 1: Select chief complaints"
556
  )
557
  gr.Markdown("<span style='color:grey'>Client Side</span>")
558
- gr.Markdown("Select at least 5 symptoms from the list below.")
559
 
560
  # Box symptoms
561
  check_boxes = []
@@ -594,7 +595,7 @@ if __name__ == "__main__":
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
 
@@ -663,7 +664,7 @@ if __name__ == "__main__":
663
 
664
  with gr.Row().style(equal_height=False):
665
  with gr.Column(scale=4):
666
- send_input_btn = gr.Button("Send the encrypted data")
667
  with gr.Column(scale=1):
668
  srv_resp_send_data_box = gr.Checkbox(
669
  label="Data Sent", show_label=False, interactive=False
@@ -701,7 +702,7 @@ if __name__ == "__main__":
701
  gr.Markdown("## Step 4: Decrypt the data")
702
  gr.Markdown("<span style='color:grey'>Client Side</span>")
703
 
704
- gr.Markdown("### Get the data from the <span style='color:grey'>Server Side</span>")
705
 
706
  error_box6 = gr.Textbox(label="Error ❌", visible=False)
707
 
@@ -721,16 +722,15 @@ if __name__ == "__main__":
721
 
722
  gr.Markdown("### Decrypt the output")
723
 
724
- decrypt_target_btn = gr.Button(
725
- "Decrypt the output with the private secret decryption key"
726
- )
727
  error_box7 = gr.Textbox(label="Error ❌", visible=False)
728
  decrypt_target_box = gr.Textbox(label="Decrypted Output:", interactive=False)
729
 
730
  decrypt_target_btn.click(
731
  decrypt_fn,
732
  inputs=[user_id_box, user_vect_box1, *check_boxes],
733
- outputs=[decrypt_target_box, error_box7],
734
  )
735
 
736
  # ------------------------- End -------------------------
 
124
  visible=False,
125
  value=get_user_symptoms_from_checkboxgroup(pretty_print(checked_symptoms)),
126
  ),
127
+ submit_button: gr.update(value="Data submitted βœ…"),
128
  }
129
 
130
 
 
457
  return {
458
  error_box7: gr.update(visible=False),
459
  decrypt_target_box: out,
460
+ submit_button: gr.update(value="Submit symptoms")
461
  }
462
 
463
 
 
468
 
469
  return {
470
  user_vect_box2: None,
471
+ submit_button: gr.update(value="Submit symptoms"),
472
  user_id_box: gr.update(visible=False, value=None, interactive=False),
473
  user_vect_box1: None,
474
  default_symptoms: gr.update(visible=True, value=None),
 
556
  "## Step 1: Select chief complaints"
557
  )
558
  gr.Markdown("<span style='color:grey'>Client Side</span>")
559
+ gr.Markdown("Select at least 5 chief complaints from the list below.")
560
 
561
  # Box symptoms
562
  check_boxes = []
 
595
  user_vect_box1 = gr.Textbox(visible=False)
596
 
597
  # Submit botton
598
+ submit_button = gr.Button("Submit symptoms")
599
  # Clear botton
600
  clear_button = gr.Button("Reset Space πŸ” ↻", visible=False)
601
 
 
664
 
665
  with gr.Row().style(equal_height=False):
666
  with gr.Column(scale=4):
667
+ send_input_btn = gr.Button("Send data")
668
  with gr.Column(scale=1):
669
  srv_resp_send_data_box = gr.Checkbox(
670
  label="Data Sent", show_label=False, interactive=False
 
702
  gr.Markdown("## Step 4: Decrypt the data")
703
  gr.Markdown("<span style='color:grey'>Client Side</span>")
704
 
705
+ gr.Markdown("### Get the encrypted data from the <span style='color:grey'>Server Side</span>")
706
 
707
  error_box6 = gr.Textbox(label="Error ❌", visible=False)
708
 
 
722
 
723
  gr.Markdown("### Decrypt the output")
724
 
725
+ decrypt_target_btn = gr.Button("Decrypt the output using the private secret key")
726
+
 
727
  error_box7 = gr.Textbox(label="Error ❌", visible=False)
728
  decrypt_target_box = gr.Textbox(label="Decrypted Output:", interactive=False)
729
 
730
  decrypt_target_btn.click(
731
  decrypt_fn,
732
  inputs=[user_id_box, user_vect_box1, *check_boxes],
733
+ outputs=[decrypt_target_box, error_box7, submit_button],
734
  )
735
 
736
  # ------------------------- End -------------------------