Tonic commited on
Commit
b9225bb
1 Parent(s): e1547c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ tokenizer.pad_token = tokenizer.eos_token
16
  def predict(input, history=[]):
17
  # tokenize the new input sentence
18
  new_user_input_ids = tokenizer.encode(
19
- input + tokenizer.eos_token, return_tensors="pt"
20
  )
21
 
22
  # append the new user input tokens to the chat history
 
16
  def predict(input, history=[]):
17
  # tokenize the new input sentence
18
  new_user_input_ids = tokenizer.encode(
19
+ input + tokenizer.eos_token, padding=True, truncation=True, return_tensors="pt"
20
  )
21
 
22
  # append the new user input tokens to the chat history