nmarafo commited on
Commit
e0a6db1
1 Parent(s): 9db9902

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ Does the human question violate the above policy? Your answer must start with 'Y
39
 
40
  def verificar_politica(message, policy):
41
  prompt = generar_prompt(message, policy)
42
- inputs = tokenizer(prompt, return_tensors="pt")
43
 
44
  with torch.no_grad():
45
  outputs = model(**inputs)
 
39
 
40
  def verificar_politica(message, policy):
41
  prompt = generar_prompt(message, policy)
42
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
43
 
44
  with torch.no_grad():
45
  outputs = model(**inputs)