Update app.py
Browse files
app.py
CHANGED
|
@@ -119,7 +119,7 @@ def add_message(history, message):
|
|
| 119 |
Returns the updated chatbot with an empty input textbox.
|
| 120 |
"""
|
| 121 |
history.append((message, None))
|
| 122 |
-
return history
|
| 123 |
|
| 124 |
def bot(history,message):
|
| 125 |
"""
|
|
@@ -218,7 +218,7 @@ with gr.Blocks(
|
|
| 218 |
components=[chatbot],
|
| 219 |
value="Clear chat",
|
| 220 |
)
|
| 221 |
-
chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot
|
| 222 |
bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
|
| 223 |
# bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
|
| 224 |
|
|
|
|
| 119 |
Returns the updated chatbot with an empty input textbox.
|
| 120 |
"""
|
| 121 |
history.append((message, None))
|
| 122 |
+
return history
|
| 123 |
|
| 124 |
def bot(history,message):
|
| 125 |
"""
|
|
|
|
| 218 |
components=[chatbot],
|
| 219 |
value="Clear chat",
|
| 220 |
)
|
| 221 |
+
chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot])
|
| 222 |
bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
|
| 223 |
# bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
|
| 224 |
|