Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def predict(input, conversation_history): #history=[]):
|
|
81 |
else:
|
82 |
'''
|
83 |
|
84 |
-
bot_input =
|
85 |
chat_history_ids = model.generate(bot_input, max_length=1000, pad_token_id=tokenizer.eos_token_id)
|
86 |
response = tokenizer.decode(chat_history_ids[:, bot_input.shape[-1]:][0], skip_special_tokens=True)
|
87 |
#return response
|
|
|
81 |
else:
|
82 |
'''
|
83 |
|
84 |
+
bot_input = tokenizer.encode(input + tokenizer.eos_token, return_tensors="pt")
|
85 |
chat_history_ids = model.generate(bot_input, max_length=1000, pad_token_id=tokenizer.eos_token_id)
|
86 |
response = tokenizer.decode(chat_history_ids[:, bot_input.shape[-1]:][0], skip_special_tokens=True)
|
87 |
#return response
|