Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ app = FastAPI()
|
|
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("text2text-generation",
|
25 |
|
26 |
# ✅ Function to truncate text to 450 tokens
|
27 |
def truncate_text(text, max_tokens=450):
|
|
|
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("text2text-generation",model="google/flan-t5-large",tokenizer="google/flan-t5-large",use_fast=True)
|
25 |
|
26 |
# ✅ Function to truncate text to 450 tokens
|
27 |
def truncate_text(text, max_tokens=450):
|