ikraamkb commited on
Commit
c4ce36f
·
verified ·
1 Parent(s): c724805

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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", model="google/flan-t5-large") # ✅ FLAN-T5 Fixed
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):