VanYsa commited on
Commit
5d8ed55
·
1 Parent(s): af9e168

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -219,7 +219,7 @@ with gr.Blocks(
219
  components=[chatbot],
220
  value="Clear chat",
221
  )
222
- if chat_input.value is not None:
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])