Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|