Update README.md
Browse files
README.md
CHANGED
@@ -103,7 +103,7 @@ class ChatBot:
|
|
103 |
user_input_ids = tokenizer.encode(input + tokenizer.eos_token, return_tensors="pt")
|
104 |
|
105 |
# Concatenate the user input with chat history
|
106 |
-
if self.history
|
107 |
chat_history_ids = torch.cat([self.history, user_input_ids], dim=-1)
|
108 |
else:
|
109 |
chat_history_ids = user_input_ids
|
|
|
103 |
user_input_ids = tokenizer.encode(input + tokenizer.eos_token, return_tensors="pt")
|
104 |
|
105 |
# Concatenate the user input with chat history
|
106 |
+
if len(self.history) > 0:
|
107 |
chat_history_ids = torch.cat([self.history, user_input_ids], dim=-1)
|
108 |
else:
|
109 |
chat_history_ids = user_input_ids
|