Spaces:
Runtime error
Runtime error
Commit
·
131d0ed
1
Parent(s):
6e33c29
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ x = st.file_uploader("Upload Images", type=["png","jpg","jpeg"])
|
|
| 6 |
if x is not None:
|
| 7 |
st.image(Image.open(x), width=250)
|
| 8 |
i = Image.open(x)
|
| 9 |
-
question = st.text_input("Enter your question about the image ?")
|
| 10 |
processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 11 |
model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 12 |
encoding = processor(i, question, return_tensors="pt")
|
|
|
|
| 6 |
if x is not None:
|
| 7 |
st.image(Image.open(x), width=250)
|
| 8 |
i = Image.open(x)
|
| 9 |
+
question = st.text_input("Enter your question about the image ? ")
|
| 10 |
processor = ViltProcessor.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 11 |
model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa")
|
| 12 |
encoding = processor(i, question, return_tensors="pt")
|