ikraamkb commited on
Commit
4a74e6a
·
verified ·
1 Parent(s): cb83f1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -81,8 +81,10 @@ vqa_processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
81
  vqa_model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
82
 
83
  # Load GPT model to rewrite answers
84
- gpt_tokenizer = AutoTokenizer.from_pretrained("distilgpt2")
85
- gpt_model = AutoModelForCausalLM.from_pretrained("distilgpt2")
 
 
86
 
87
  def rewrite_answer(question, short_answer):
88
  prompt = (
 
81
  vqa_model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
82
 
83
  # Load GPT model to rewrite answers
84
+
85
+ gpt_tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-small")
86
+ gpt_model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-small")
87
+
88
 
89
  def rewrite_answer(question, short_answer):
90
  prompt = (