Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ def vilt_vqa(image, question):
|
|
21 |
return answer
|
22 |
|
23 |
# Load FLAN-T5
|
24 |
-
t5_tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-
|
25 |
-
t5_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-
|
26 |
|
27 |
def flan_t5_complete_sentence(question, answer):
|
28 |
input_text = f"A question: {question} An incomplete answer: {answer}. Based on these, answer the question with a complete sentence without extra information."
|
|
|
21 |
return answer
|
22 |
|
23 |
# Load FLAN-T5
|
24 |
+
t5_tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large")
|
25 |
+
t5_model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large", device_map="auto")
|
26 |
|
27 |
def flan_t5_complete_sentence(question, answer):
|
28 |
input_text = f"A question: {question} An incomplete answer: {answer}. Based on these, answer the question with a complete sentence without extra information."
|