gba16326553 commited on
Commit
cf380d2
·
verified ·
1 Parent(s): e65902e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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