msinghy commited on
Commit
02ebcf9
1 Parent(s): 5c9bbd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -33,7 +33,7 @@ def respond(query):
33
  eval_prompt = "###Input: " + query + "\n\n###Output: "
34
  model_input = tokenizer(eval_prompt, return_tensors="pt")#.to("cuda")
35
  output = ft_model.generate(input_ids=model_input["input_ids"]#.to(device),
36
- attention_mask=model_input["attention_mask"],
37
  max_new_tokens=500)
38
  result = tokenizer.decode(output[0], skip_special_tokens=True).replace(eval_prompt, "")
39
  return result
 
33
  eval_prompt = "###Input: " + query + "\n\n###Output: "
34
  model_input = tokenizer(eval_prompt, return_tensors="pt")#.to("cuda")
35
  output = ft_model.generate(input_ids=model_input["input_ids"]#.to(device),
36
+ ,attention_mask=model_input["attention_mask"],
37
  max_new_tokens=500)
38
  result = tokenizer.decode(output[0], skip_special_tokens=True).replace(eval_prompt, "")
39
  return result