Upload app.py
Browse files
app.py
CHANGED
|
@@ -305,6 +305,7 @@ with gr.Blocks() as demo:
|
|
| 305 |
msg = gr.Textbox(label="Your message", placeholder="Ask or tell me anything about countries and capital city", lines=2)
|
| 306 |
|
| 307 |
with gr.Row():
|
|
|
|
| 308 |
clear = gr.Button("Clear chat")
|
| 309 |
clear_memory = gr.Button("Clear My Short Memory") # π New button
|
| 310 |
|
|
@@ -313,7 +314,7 @@ with gr.Blocks() as demo:
|
|
| 313 |
|
| 314 |
state = gr.State([])
|
| 315 |
|
| 316 |
-
|
| 317 |
clear.click(lambda: ([], []), None, [chatbot, state])
|
| 318 |
clear_memory.click(clear_user_memory, None, [chatbot, state])
|
| 319 |
|
|
|
|
| 305 |
msg = gr.Textbox(label="Your message", placeholder="Ask or tell me anything about countries and capital city", lines=2)
|
| 306 |
|
| 307 |
with gr.Row():
|
| 308 |
+
submit_btn = gr.Button("Submit")
|
| 309 |
clear = gr.Button("Clear chat")
|
| 310 |
clear_memory = gr.Button("Clear My Short Memory") # π New button
|
| 311 |
|
|
|
|
| 314 |
|
| 315 |
state = gr.State([])
|
| 316 |
|
| 317 |
+
submit_btn.click(chat_interface, [msg, state], [chatbot, state, msg, google_btn, bing_btn])
|
| 318 |
clear.click(lambda: ([], []), None, [chatbot, state])
|
| 319 |
clear_memory.click(clear_user_memory, None, [chatbot, state])
|
| 320 |
|