Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,10 +18,10 @@ import io
|
|
18 |
app = FastAPI()
|
19 |
|
20 |
# β
Load AI Models
|
21 |
-
qa_pipeline = pipeline("question-answering", model="deepset/roberta-base-squad2")
|
22 |
vqa_pipeline = pipeline("image-to-text", model="Salesforce/blip-vqa-base")
|
23 |
code_generator = pipeline("text-generation", model="openai-community/gpt2-medium")
|
24 |
table_analyzer = pipeline("table-question-answering", model="google/tapas-large-finetuned-wtq")
|
|
|
25 |
|
26 |
# β
Functions for Document & Image QA
|
27 |
def extract_text_from_pdf(pdf_file):
|
|
|
18 |
app = FastAPI()
|
19 |
|
20 |
# β
Load AI Models
|
|
|
21 |
vqa_pipeline = pipeline("image-to-text", model="Salesforce/blip-vqa-base")
|
22 |
code_generator = pipeline("text-generation", model="openai-community/gpt2-medium")
|
23 |
table_analyzer = pipeline("table-question-answering", model="google/tapas-large-finetuned-wtq")
|
24 |
+
qa_pipeline = pipeline("text-generation", model="facebook/bart-large-cnn")
|
25 |
|
26 |
# β
Functions for Document & Image QA
|
27 |
def extract_text_from_pdf(pdf_file):
|