Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -9,12 +9,7 @@ from transformers import pipeline, DistilBertTokenizer, DistilBertForQuestionAns
|
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
12 |
-
|
13 |
-
model_name = "distilbert-base-cased-distilled-squad"
|
14 |
-
tokenizer = DistilBertTokenizer.from_pretrained(model_name)
|
15 |
-
model = DistilBertForQuestionAnswering.from_pretrained(model_name)
|
16 |
-
|
17 |
-
nlp_qa = pipeline("question-answering", model=model, tokenizer=tokenizer)
|
18 |
|
19 |
description = """
|
20 |
## Image-based Document QA
|
|
|
9 |
|
10 |
app = FastAPI()
|
11 |
|
12 |
+
nlp_qa = pipeline("question-answering", model="distilbert-base-cased-distilled-squad")
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
description = """
|
15 |
## Image-based Document QA
|