nicholasKluge commited on
Commit
1239f40
1 Parent(s): f79078a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -155,8 +155,9 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
155
  Chatbot's response generator.
156
  """
157
 
158
- # OPT tokenizer already adds the BOS token, so we do not need to add it manually
159
- inputs = tokenizer(user_msg + tokenizer.sep_token, return_tensors="pt").to(model.device)
 
160
 
161
  generated_response = model.generate(**inputs,
162
  repetition_penalty=repetition_penalty,
 
155
  Chatbot's response generator.
156
  """
157
 
158
+ inputs = tokenizer(tokenizer.bos_token + user_msg + tokenizer.sep_token,
159
+ add_special_tokens=False,
160
+ return_tensors="pt").to(model.device)
161
 
162
  generated_response = model.generate(**inputs,
163
  repetition_penalty=repetition_penalty,