Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ class ChatBot:
|
|
| 34 |
user_input_ids = tokenizer.encode(input + tokenizer.eos_token, return_tensors="pt")
|
| 35 |
|
| 36 |
# Concatenate the user input with chat history
|
| 37 |
-
if self.history
|
| 38 |
chat_history_ids = torch.cat([self.history, user_input_ids], dim=-1)
|
| 39 |
else:
|
| 40 |
chat_history_ids = user_input_ids
|
|
|
|
| 34 |
user_input_ids = tokenizer.encode(input + tokenizer.eos_token, return_tensors="pt")
|
| 35 |
|
| 36 |
# Concatenate the user input with chat history
|
| 37 |
+
if len(self.history) > 0:
|
| 38 |
chat_history_ids = torch.cat([self.history, user_input_ids], dim=-1)
|
| 39 |
else:
|
| 40 |
chat_history_ids = user_input_ids
|