Soma Dhavala commited on
Commit ·
44e94ee
1
Parent(s): 159ce5e
add submit button
Browse files
app.py
CHANGED
|
@@ -43,8 +43,9 @@ def clear_history(lang = "English"):
|
|
| 43 |
with gr.Blocks(title="Ag GPT Demo") as demo:
|
| 44 |
chatbot = gr.Chatbot()
|
| 45 |
msg = gr.Textbox()
|
|
|
|
| 46 |
clear = gr.Button("Clear")
|
| 47 |
-
|
| 48 |
clear.click(clear_history, None, chatbot, queue=False)
|
| 49 |
|
| 50 |
|
|
|
|
| 43 |
with gr.Blocks(title="Ag GPT Demo") as demo:
|
| 44 |
chatbot = gr.Chatbot()
|
| 45 |
msg = gr.Textbox()
|
| 46 |
+
submit = gr.Button("Submit")
|
| 47 |
clear = gr.Button("Clear")
|
| 48 |
+
submit.click(user, [msg, chatbot], [msg, chatbot]).then(bot, chatbot, chatbot)
|
| 49 |
clear.click(clear_history, None, chatbot, queue=False)
|
| 50 |
|
| 51 |
|