nmarafo commited on
Commit
3c99aa7
1 Parent(s): e0a6db1

Update app.py

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