Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def predict(input, history=[]):
|
|
19 |
new_user_input_ids = tokenizer.encode(
|
20 |
input + tokenizer.eos_token, return_tensors="pt"
|
21 |
)
|
22 |
-
attentionMask = torch.ones(new_user_input_ids,dtype=torch.long)
|
23 |
# append the new user input tokens to the chat history
|
24 |
bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)
|
25 |
|
|
|
19 |
new_user_input_ids = tokenizer.encode(
|
20 |
input + tokenizer.eos_token, return_tensors="pt"
|
21 |
)
|
22 |
+
attentionMask = torch.ones(new_user_input_ids.shape, dtype=torch.long)
|
23 |
# append the new user input tokens to the chat history
|
24 |
bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)
|
25 |
|