Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ def chat(message: str, history: list, stm_state: torch.Tensor, temperature: floa
|
|
| 28 |
response = ""
|
| 29 |
for token_id in model.interact(**tokenized_query, max_seq_len=seq_len, temperature=temperature, top_p=top_p):
|
| 30 |
response += model.stringify_token(token_id, show_memory_update=True)
|
| 31 |
-
yield history + [[message, response]]
|
| 32 |
|
| 33 |
return history + [[message, response]], model.export_stm_state().cpu()
|
| 34 |
|
|
|
|
| 28 |
response = ""
|
| 29 |
for token_id in model.interact(**tokenized_query, max_seq_len=seq_len, temperature=temperature, top_p=top_p):
|
| 30 |
response += model.stringify_token(token_id, show_memory_update=True)
|
| 31 |
+
yield history + [[message, response]], stm_state
|
| 32 |
|
| 33 |
return history + [[message, response]], model.export_stm_state().cpu()
|
| 34 |
|