SysModeler commited on
Commit
6b99f82
·
verified ·
1 Parent(s): ebf9b81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -274,9 +274,12 @@ def count_conversation_turns(history):
274
 
275
  # Chatbot logic
276
  def sysml_chatbot(message, history):
277
- if message == "":
278
- print("Can I help you with anything else?")
279
-
 
 
 
280
  chat_messages = convert_history_to_messages(history)
281
 
282
  # Count current conversation turns for smart question timing
 
274
 
275
  # Chatbot logic
276
  def sysml_chatbot(message, history):
277
+
278
+ if not message.strip():
279
+ answer = "Can I help you with anything else?"
280
+ history.append(("", answer))
281
+ return "", history
282
+
283
  chat_messages = convert_history_to_messages(history)
284
 
285
  # Count current conversation turns for smart question timing