ECUiVADE commited on
Commit
47e5323
1 Parent(s): 33715ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -232,6 +232,8 @@ class ChatbotAPP:
232
  self.update_chatlog_name()
233
  return f"All Chat components have been rest. Uniqe ID for this session is, {self.unique_id}. Please note this down.",self.unique_id
234
 
 
 
235
 
236
  def create_app(self): # Method to launch the Gradio app
237
 
@@ -271,7 +273,7 @@ class ChatbotAPP:
271
  send = gr.Button("Send")
272
  clear = gr.Button("Clear Chat")
273
  send.click(self.generate, inputs=[msg], outputs=chatbot)
274
- clear.click(lambda: chatbot.clear(), inputs=[], outputs=chatbot)
275
 
276
  with gr.Tab("Reset"):
277
  reset_button = gr.Button("Reset ChatBot Instance")
 
232
  self.update_chatlog_name()
233
  return f"All Chat components have been rest. Uniqe ID for this session is, {self.unique_id}. Please note this down.",self.unique_id
234
 
235
+ def clear_chat_window(self):
236
+ return []
237
 
238
  def create_app(self): # Method to launch the Gradio app
239
 
 
273
  send = gr.Button("Send")
274
  clear = gr.Button("Clear Chat")
275
  send.click(self.generate, inputs=[msg], outputs=chatbot)
276
+ clear.click(self.clear_chart_window, inputs=[], outputs=chatbot)
277
 
278
  with gr.Tab("Reset"):
279
  reset_button = gr.Button("Reset ChatBot Instance")