Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def respond(message, max_tokens, temperature, top_p):
|
|
79 |
return violation_message
|
80 |
|
81 |
assistant_prompt = f"{system_message}\nUser: {message}\nAssistant:"
|
82 |
-
inputs = tokenizer(assistant_prompt, return_tensors="pt")
|
83 |
outputs = model.generate(
|
84 |
**inputs,
|
85 |
max_new_tokens=max_tokens,
|
|
|
79 |
return violation_message
|
80 |
|
81 |
assistant_prompt = f"{system_message}\nUser: {message}\nAssistant:"
|
82 |
+
inputs = tokenizer(assistant_prompt, return_tensors="pt").to(model.device)
|
83 |
outputs = model.generate(
|
84 |
**inputs,
|
85 |
max_new_tokens=max_tokens,
|