Spaces:
Build error
Build error
Send button
Browse files
app.py
CHANGED
|
@@ -15,13 +15,14 @@ def gradio_interface():
|
|
| 15 |
gr.Markdown("## Fake Chatbot UI")
|
| 16 |
user_input = gr.Textbox(label="User Input", placeholder="Type your message here...", lines=2)
|
| 17 |
chat_history = gr.Chatbot()
|
|
|
|
| 18 |
|
| 19 |
def respond(user_input, history):
|
| 20 |
bot_reply, history = chatbot_response(user_input, history)
|
| 21 |
return history, history
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
chatbot_ui.launch()
|
| 26 |
|
| 27 |
-
gradio_interface()
|
|
|
|
| 15 |
gr.Markdown("## Fake Chatbot UI")
|
| 16 |
user_input = gr.Textbox(label="User Input", placeholder="Type your message here...", lines=2)
|
| 17 |
chat_history = gr.Chatbot()
|
| 18 |
+
send_button = gr.Button("Send")
|
| 19 |
|
| 20 |
def respond(user_input, history):
|
| 21 |
bot_reply, history = chatbot_response(user_input, history)
|
| 22 |
return history, history
|
| 23 |
|
| 24 |
+
send_button.click(respond, [user_input, chat_history], [chat_history, chat_history])
|
| 25 |
|
| 26 |
chatbot_ui.launch()
|
| 27 |
|
| 28 |
+
gradio_interface()
|