Persist user history
Browse files
app.py
CHANGED
@@ -211,10 +211,10 @@ def chat_with_model(messages):
|
|
211 |
|
212 |
if in_think:
|
213 |
output_text += "*"
|
214 |
-
updated_messages[-1]["content"] = output_text
|
215 |
|
216 |
-
torch.cuda.empty_cache()
|
217 |
updated_messages[-1]["content"] = output_text
|
|
|
|
|
218 |
return updated_messages
|
219 |
|
220 |
|
|
|
211 |
|
212 |
if in_think:
|
213 |
output_text += "*"
|
|
|
214 |
|
|
|
215 |
updated_messages[-1]["content"] = output_text
|
216 |
+
patient_conversations[current_id] = updated_messages # <- SAVE the full conversation including model outputs
|
217 |
+
torch.cuda.empty_cache()
|
218 |
return updated_messages
|
219 |
|
220 |
|