Spaces:
Runtime error
Runtime error
Donato8408
commited on
Commit
•
3eec87b
1
Parent(s):
c1c6489
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import AutoTokenizer, AutoModelForQuestionAnswering
|
|
3 |
import torch
|
4 |
|
5 |
# Load model and tokenizer
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
7 |
-
model = AutoModelForQuestionAnswering.from_pretrained("
|
8 |
|
9 |
# Define function to predict answer
|
10 |
def predict_answer(context, question):
|
|
|
3 |
import torch
|
4 |
|
5 |
# Load model and tokenizer
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("impira/layoutlm-document-qa")
|
7 |
+
model = AutoModelForQuestionAnswering.from_pretrained("impira/layoutlm-document-qa")
|
8 |
|
9 |
# Define function to predict answer
|
10 |
def predict_answer(context, question):
|