Spaces:
Runtime error
Runtime error
Commit
·
60abd67
1
Parent(s):
06ccb0a
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ if __name__ == "__main__":
|
|
15 |
|
16 |
def get_answer(question, context):
|
17 |
|
18 |
-
encoding = tokenizer(question, context, return_tensors="jax", max_length=
|
19 |
start_scores, end_scores = forward(**encoding).to_tuple()
|
20 |
|
21 |
# Let's take the most likely token using `argmax` and retrieve the answer
|
|
|
15 |
|
16 |
def get_answer(question, context):
|
17 |
|
18 |
+
encoding = tokenizer(question, context, return_tensors="jax", max_length=512, padding="max_length", truncation=True)
|
19 |
start_scores, end_scores = forward(**encoding).to_tuple()
|
20 |
|
21 |
# Let's take the most likely token using `argmax` and retrieve the answer
|