Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ mdl = BlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-40
|
|
8 |
|
9 |
def converse(user_input, chat_history=[]):
|
10 |
#tkn_ids = chat_tkn(input(">> User:") + chat_tkn.eos_token, return_tensors='pt')
|
11 |
-
user_input_ids = chat_tkn(
|
12 |
|
13 |
# append the new user input tokens to the chat history
|
14 |
bot_input_ids = torch.cat([torch.LongTensor(history), user_input_ids], dim=-1)
|
|
|
8 |
|
9 |
def converse(user_input, chat_history=[]):
|
10 |
#tkn_ids = chat_tkn(input(">> User:") + chat_tkn.eos_token, return_tensors='pt')
|
11 |
+
user_input_ids = chat_tkn(user_input + chat_tkn.eos_token, return_tensors='pt')
|
12 |
|
13 |
# append the new user input tokens to the chat history
|
14 |
bot_input_ids = torch.cat([torch.LongTensor(history), user_input_ids], dim=-1)
|