Update app.py
Browse files
app.py
CHANGED
@@ -219,7 +219,7 @@ with gr.Blocks(
|
|
219 |
components=[chatbot],
|
220 |
value="Clear chat",
|
221 |
)
|
222 |
-
if chat_input.value
|
223 |
chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot, chat_input])
|
224 |
bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
|
225 |
bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
|
|
|
219 |
components=[chatbot],
|
220 |
value="Clear chat",
|
221 |
)
|
222 |
+
if chat_input.value != "":
|
223 |
chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot, chat_input])
|
224 |
bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
|
225 |
bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
|