Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ def chatbot_response(user_message):
|
|
| 66 |
# generated a response while limiting the total chat history to 1000 tokens,
|
| 67 |
chat_history_ids = chatbot_model.generate(bot_input_ids, max_length=1000, pad_token_id=chatbot_tokenizer.eos_token_id)
|
| 68 |
|
| 69 |
-
response =
|
| 70 |
|
| 71 |
new_chat = False
|
| 72 |
|
|
|
|
| 66 |
# generated a response while limiting the total chat history to 1000 tokens,
|
| 67 |
chat_history_ids = chatbot_model.generate(bot_input_ids, max_length=1000, pad_token_id=chatbot_tokenizer.eos_token_id)
|
| 68 |
|
| 69 |
+
response = chatbot_tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens=True)
|
| 70 |
|
| 71 |
new_chat = False
|
| 72 |
|