Spaces:
Paused
Paused
Commit
·
03c8c47
1
Parent(s):
19f6384
fixed bug
Browse files
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["
|
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(
|
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"),
|