Spaces:
Running
Running
nicholasKluge
commited on
Commit
•
1239f40
1
Parent(s):
f79078a
Update app.py
Browse files
app.py
CHANGED
@@ -155,8 +155,9 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
|
|
155 |
Chatbot's response generator.
|
156 |
"""
|
157 |
|
158 |
-
|
159 |
-
|
|
|
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,
|