Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -81,8 +81,9 @@ 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("
|
85 |
-
gpt_model = AutoModelForCausalLM.from_pretrained("
|
|
|
86 |
|
87 |
def rewrite_answer(question):
|
88 |
prompt = f"{question}\nAnswer with a full sentence:"
|
|
|
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 |
|
88 |
def rewrite_answer(question):
|
89 |
prompt = f"{question}\nAnswer with a full sentence:"
|