Spaces:
Runtime error
Runtime error
mkw18
commited on
Commit
•
6c375d8
1
Parent(s):
0e83748
add submit
Browse files
app.py
CHANGED
@@ -168,6 +168,9 @@ with gr.Blocks() as demo:
|
|
168 |
messages = gr.State(data['messages'])
|
169 |
|
170 |
# submitBtn.click(showInput, [user_input, chatbot], [chatbot])
|
|
|
|
|
|
|
171 |
submitBtn.click(predict, [user_input, chatbot, messages, idx, answer], [chatbot, messages],
|
172 |
show_progress=True)
|
173 |
submitBtn.click(reset_user_input, [], [user_input])
|
|
|
168 |
messages = gr.State(data['messages'])
|
169 |
|
170 |
# submitBtn.click(showInput, [user_input, chatbot], [chatbot])
|
171 |
+
user_input.submit(predict, [user_input, chatbot, messages, idx, answer], [chatbot, messages],
|
172 |
+
show_progress=True)
|
173 |
+
user_input.submit(reset_user_input, [], [user_input])
|
174 |
submitBtn.click(predict, [user_input, chatbot, messages, idx, answer], [chatbot, messages],
|
175 |
show_progress=True)
|
176 |
submitBtn.click(reset_user_input, [], [user_input])
|