Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ def generate_answer(question, context, contexts):
|
|
89 |
|
90 |
# Generate the answer
|
91 |
with torch.no_grad():
|
92 |
-
generated_ids = model.generate(input_ids, max_new_tokens=max_target_length)
|
93 |
|
94 |
# Decode and return the generated answer
|
95 |
generated_answer = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
|
|
|
89 |
|
90 |
# Generate the answer
|
91 |
with torch.no_grad():
|
92 |
+
generated_ids = model.generate(input_ids=input_ids, max_new_tokens=max_target_length)
|
93 |
|
94 |
# Decode and return the generated answer
|
95 |
generated_answer = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
|