dek924 commited on
Commit
e646c57
Β·
1 Parent(s): e20b11f

feat: auto-mode visualization update

Browse files
Files changed (1) hide show
  1. app.py +18 -13
app.py CHANGED
@@ -954,13 +954,13 @@ with gr.Blocks(title="PatientSim", theme=gr.themes.Soft(), css=CUSTOM_CSS) as de
954
  manual_btn = gr.Button("Start Practice", variant="primary")
955
 
956
  with gr.Row():
957
- back_from_mode_btn = gr.Button("← Back to Setup", scale=0)
958
 
959
  # ── Auto simulation section ──────────────────────────────────────────────
960
  with gr.Column(visible=False) as auto_section:
961
  with gr.Row():
962
- back_from_auto_btn = gr.Button("← Back to Setup", scale=0)
963
- back_from_auto_to_mode_btn = gr.Button("← Mode Selection", scale=0)
964
 
965
  gr.Markdown(
966
  "### πŸ€– Auto Simulation\n\n"
@@ -969,16 +969,21 @@ with gr.Blocks(title="PatientSim", theme=gr.themes.Soft(), css=CUSTOM_CSS) as de
969
  "**Doctor** (user) messages appear on the right; **Patient** (assistant) responses on the left."
970
  )
971
  auto_recap = gr.HTML()
972
- auto_chatbot = gr.Chatbot(
973
- label="Doctor–Patient Dialogue",
974
- height=560,
975
- show_label=True,
976
- avatar_images=(
977
- _DOCTOR_AVATAR,
978
- list(_PATIENT_AVATAR_URLS.values())[0], # overridden dynamically on start
979
- ),
980
- placeholder="Run the auto simulation to see the dialogue here.",
981
- )
 
 
 
 
 
982
 
983
  # ── Manual chat section ──────────────────────────────────────────────────
984
  with gr.Column(visible=False) as chat_section:
 
954
  manual_btn = gr.Button("Start Practice", variant="primary")
955
 
956
  with gr.Row():
957
+ back_from_mode_btn = gr.Button("← Back to Setup")
958
 
959
  # ── Auto simulation section ──────────────────────────────────────────────
960
  with gr.Column(visible=False) as auto_section:
961
  with gr.Row():
962
+ back_from_auto_btn = gr.Button("← Back to Setup")
963
+ back_from_auto_to_mode_btn = gr.Button("← Mode Selection")
964
 
965
  gr.Markdown(
966
  "### πŸ€– Auto Simulation\n\n"
 
969
  "**Doctor** (user) messages appear on the right; **Patient** (assistant) responses on the left."
970
  )
971
  auto_recap = gr.HTML()
972
+ with gr.Row(equal_height=False):
973
+ with gr.Column(scale=1, min_width=280):
974
+ auto_recap = gr.HTML()
975
+ with gr.Column(scale=2):
976
+ auto_chatbot = gr.Chatbot(
977
+ label="Doctor–Patient Dialogue",
978
+ height=560,
979
+ show_label=True,
980
+ avatar_images=(
981
+ _DOCTOR_AVATAR,
982
+ list(_PATIENT_AVATAR_URLS.values())[0],
983
+ ),
984
+ placeholder="Run the auto simulation to see the dialogue here.",
985
+ )
986
+
987
 
988
  # ── Manual chat section ──────────────────────────────────────────────────
989
  with gr.Column(visible=False) as chat_section: