bupa1018 commited on
Commit
e2e1781
·
1 Parent(s): 770f75c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,7 +57,7 @@ def add_text_to_chatbot(chat_history, user_input):
57
 
58
 
59
  def show_history(chat_history):
60
- return chat_history[-1][0], ""
61
 
62
 
63
  def main():
@@ -94,7 +94,7 @@ def main():
94
  )
95
 
96
  # Use the state to persist chat history between interactions
97
- submit_btn.click(add_text_to_chatbot, [chat_history, user_txt], [chat_history, user_txt]).then(show_history,[chat_history], [chatbot])
98
  .then(bot_kadi, [chat_history], [chatbot])
99
 
100
  clear_btn.click(lambda: ([], ""), None, [chat_history, chatbot, user_txt])
 
57
 
58
 
59
  def show_history(chat_history):
60
+ return chat_history
61
 
62
 
63
  def main():
 
94
  )
95
 
96
  # Use the state to persist chat history between interactions
97
+ submit_btn.click(add_text_to_chatbot, [chat_history, user_txt], [chat_history, user_txt]).then(show_history,[chat_history], [chatbot])\
98
  .then(bot_kadi, [chat_history], [chatbot])
99
 
100
  clear_btn.click(lambda: ([], ""), None, [chat_history, chatbot, user_txt])