Spaces:
Sleeping
Sleeping
Solarum Asteridion
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -169,18 +169,18 @@ padding: 8px 16px;
|
|
| 169 |
if user_message.strip() == "":
|
| 170 |
return history, history # Do not process empty messages
|
| 171 |
history, updated_history = chatbot_interface(user_message, history)
|
| 172 |
-
return history, updated_history
|
| 173 |
|
| 174 |
send.click(
|
| 175 |
update_chat,
|
| 176 |
inputs=[msg, chatbot],
|
| 177 |
-
outputs=[chatbot, chatbot]
|
| 178 |
)
|
| 179 |
|
| 180 |
msg.submit(
|
| 181 |
update_chat,
|
| 182 |
inputs=[msg, chatbot],
|
| 183 |
-
outputs=[chatbot, chatbot]
|
| 184 |
)
|
| 185 |
|
| 186 |
demo.launch()
|
|
|
|
| 169 |
if user_message.strip() == "":
|
| 170 |
return history, history # Do not process empty messages
|
| 171 |
history, updated_history = chatbot_interface(user_message, history)
|
| 172 |
+
return history, updated_history, "" # Clear textbox
|
| 173 |
|
| 174 |
send.click(
|
| 175 |
update_chat,
|
| 176 |
inputs=[msg, chatbot],
|
| 177 |
+
outputs=[chatbot, chatbot, msg] # Added msg to outputs
|
| 178 |
)
|
| 179 |
|
| 180 |
msg.submit(
|
| 181 |
update_chat,
|
| 182 |
inputs=[msg, chatbot],
|
| 183 |
+
outputs=[chatbot, chatbot, msg] # Added msg to outputs
|
| 184 |
)
|
| 185 |
|
| 186 |
demo.launch()
|