Reality123b commited on
Commit
f95a698
·
verified ·
1 Parent(s): f95b164

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -80,7 +80,7 @@ class XylariaChat:
80
  print(f"Error resetting API client: {e}")
81
 
82
  self.save_chat() # Save the empty chat history
83
- return None # To clear the chatbot interface
84
 
85
  def get_response(self, user_input):
86
  # Prepare messages with conversation context and persistent memory
@@ -297,8 +297,8 @@ class XylariaChat:
297
 
298
  # Clear conversation
299
  clear.click(
300
- fn=lambda _: None, # Corrected lambda to accept an argument
301
- inputs=gr.State(None), # Pass a dummy state value
302
  outputs=[chatbot],
303
  queue=False
304
  ).then(
@@ -320,7 +320,7 @@ class XylariaChat:
320
  )
321
 
322
  # Load chat history on interface load
323
- demo.load(self.reset_conversation, None, None)
324
 
325
  return demo
326
 
 
80
  print(f"Error resetting API client: {e}")
81
 
82
  self.save_chat() # Save the empty chat history
83
+ #return None # To clear the chatbot interface
84
 
85
  def get_response(self, user_input):
86
  # Prepare messages with conversation context and persistent memory
 
297
 
298
  # Clear conversation
299
  clear.click(
300
+ fn=lambda: None,
301
+ inputs=None,
302
  outputs=[chatbot],
303
  queue=False
304
  ).then(
 
320
  )
321
 
322
  # Load chat history on interface load
323
+ demo.load(self.reset_conversation, [], None)
324
 
325
  return demo
326