Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -112,11 +112,7 @@ def process_response(prompt, chat_history, token_count, examples_state):
|
|
112 |
question1, question2, question3 = new_follow_up_questions_formatted
|
113 |
|
114 |
# Update examples state with the new follow-up questions
|
115 |
-
examples_state
|
116 |
-
[question1],
|
117 |
-
[question2],
|
118 |
-
[question3]
|
119 |
-
])
|
120 |
|
121 |
follow_up_questions_md = "\n".join(new_follow_up_questions_formatted)
|
122 |
|
@@ -204,7 +200,7 @@ with gr.Blocks(css=css) as demo:
|
|
204 |
|
205 |
btn.click(
|
206 |
fn=process_response,
|
207 |
-
inputs=[txt, gr.State(chat_history),gr.State(examples_state.value)],
|
208 |
outputs=[chatbot, token_info, follow_up_questions_md, examples_state]
|
209 |
|
210 |
)
|
|
|
112 |
question1, question2, question3 = new_follow_up_questions_formatted
|
113 |
|
114 |
# Update examples state with the new follow-up questions
|
115 |
+
examples_state = [[question1], [question2], [question3]]
|
|
|
|
|
|
|
|
|
116 |
|
117 |
follow_up_questions_md = "\n".join(new_follow_up_questions_formatted)
|
118 |
|
|
|
200 |
|
201 |
btn.click(
|
202 |
fn=process_response,
|
203 |
+
inputs=[txt, gr.State(chat_history), gr.State(initial_examples), gr.State(examples_state.value)],
|
204 |
outputs=[chatbot, token_info, follow_up_questions_md, examples_state]
|
205 |
|
206 |
)
|