Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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])
|