CodCodingCode commited on
Commit
03c8c47
·
1 Parent(s): 19f6384
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -221,7 +221,7 @@ def stateful_ui_fn(user_input, history):
221
  # Run one round of simulation
222
  res = simulate_interaction(user_input)
223
  # Extract last doctor line from the fresh conversation
224
- last_line = res["q_out"].splitlines()[-1]
225
  # Append the doctor's new line
226
  history.append(last_line)
227
  # Build the displayed conversation
@@ -234,7 +234,7 @@ demo = gr.Interface(
234
  fn=stateful_ui_fn,
235
  inputs=[
236
  gr.Textbox(label="Patient Response"),
237
- gr.State([]), # holds the conversation history
238
  ],
239
  outputs=[
240
  gr.Textbox(label="Doctor Simulation Output"),
 
221
  # Run one round of simulation
222
  res = simulate_interaction(user_input)
223
  # Extract last doctor line from the fresh conversation
224
+ last_line = res["question"]["output"]
225
  # Append the doctor's new line
226
  history.append(last_line)
227
  # Build the displayed conversation
 
234
  fn=stateful_ui_fn,
235
  inputs=[
236
  gr.Textbox(label="Patient Response"),
237
+ gr.State(), # holds the conversation history
238
  ],
239
  outputs=[
240
  gr.Textbox(label="Doctor Simulation Output"),