Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -135,12 +135,12 @@ with gr.Blocks(css=custom_css) as demo:
|
|
135 |
chat_history.append((previous_message, bot_message))
|
136 |
return history, update_history(chat_history)
|
137 |
|
138 |
-
submit_button.click(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
139 |
-
bot, [chatbot
|
140 |
)
|
141 |
-
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
142 |
-
bot, [chatbot
|
143 |
)
|
144 |
-
clear.click(lambda: None, None, chatbot, queue=False)
|
145 |
|
146 |
demo.launch(share=True)
|
|
|
135 |
chat_history.append((previous_message, bot_message))
|
136 |
return history, update_history(chat_history)
|
137 |
|
138 |
+
submit_button.click(fn=user, inputs=[msg, chatbot], outputs=[msg, chatbot], queue=False).then(
|
139 |
+
fn=bot, inputs=[chatbot], outputs=[chatbot, history]
|
140 |
)
|
141 |
+
msg.submit(fn=user, inputs=[msg, chatbot], outputs=[msg, chatbot], queue=False).then(
|
142 |
+
fn=bot, inputs=[chatbot], outputs=[chatbot, history]
|
143 |
)
|
144 |
+
clear.click(fn=lambda: None, inputs=None, outputs=chatbot, queue=False)
|
145 |
|
146 |
demo.launch(share=True)
|