MJobe commited on
Commit
1c5522d
·
1 Parent(s): 0270b61

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -6
main.py CHANGED
@@ -9,12 +9,7 @@ from transformers import pipeline, DistilBertTokenizer, DistilBertForQuestionAns
9
 
10
  app = FastAPI()
11
 
12
- # Load DistilBERT-based question answering model
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