Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,19 +101,16 @@ def process_input(user_input, history):
|
|
101 |
# Get the updated history and bot response
|
102 |
updated_history, _ = respond(user_input, history)
|
103 |
|
104 |
-
# Save the updated chat history
|
105 |
save_chat(updated_history)
|
106 |
|
107 |
-
|
108 |
-
return updated_history, "", updated_history
|
109 |
|
110 |
with gr.Blocks() as demo:
|
111 |
chatbot = gr.Chatbot()
|
112 |
msg = gr.Textbox(placeholder="Type your message here...")
|
113 |
-
state = gr.State([])
|
114 |
|
115 |
-
|
116 |
-
# Add 'msg' to the outputs so its value can be updated
|
117 |
msg.submit(process_input, inputs=[msg, state], outputs=[chatbot, msg, state])
|
118 |
-
|
119 |
demo.launch()
|
|
|
101 |
# Get the updated history and bot response
|
102 |
updated_history, _ = respond(user_input, history)
|
103 |
|
|
|
104 |
save_chat(updated_history)
|
105 |
|
106 |
+
|
107 |
+
return updated_history, "", updated_history
|
108 |
|
109 |
with gr.Blocks() as demo:
|
110 |
chatbot = gr.Chatbot()
|
111 |
msg = gr.Textbox(placeholder="Type your message here...")
|
112 |
+
state = gr.State([])
|
113 |
|
114 |
+
|
|
|
115 |
msg.submit(process_input, inputs=[msg, state], outputs=[chatbot, msg, state])
|
|
|
116 |
demo.launch()
|