Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ torch.hub.download_url_to_file('https://cdn.openai.com/dall-e-2/demos/text2im/as
|
|
| 8 |
processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 9 |
model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 10 |
|
| 11 |
-
def getAnswer(
|
| 12 |
encoding = processor(image, text, return_tensors="pt")
|
| 13 |
|
| 14 |
# forward pass
|
|
|
|
| 8 |
processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 9 |
model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 10 |
|
| 11 |
+
def getAnswer(image,text):
|
| 12 |
encoding = processor(image, text, return_tensors="pt")
|
| 13 |
|
| 14 |
# forward pass
|