Update app.py
Browse files
app.py
CHANGED
@@ -160,8 +160,8 @@ with gr.Blocks() as chat_ui:
|
|
160 |
full_response = ""
|
161 |
for word in response_generator:
|
162 |
full_response += word + " "
|
163 |
-
chat_history
|
164 |
-
|
165 |
|
166 |
send_btn.click(stream_response, inputs=[user_input, chatbot], outputs=[chatbot])
|
167 |
|
|
|
160 |
full_response = ""
|
161 |
for word in response_generator:
|
162 |
full_response += word + " "
|
163 |
+
yield chat_history[:-1] + [(user_input, full_response)] # Update last message only
|
164 |
+
chat_history.append((user_input, full_response))
|
165 |
|
166 |
send_btn.click(stream_response, inputs=[user_input, chatbot], outputs=[chatbot])
|
167 |
|