Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,20 @@ from datasets import load_dataset
|
|
8 |
processor = AutoProcessor.from_pretrained("microsoft/git-base-vqav2")
|
9 |
model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-vqav2")
|
10 |
|
11 |
-
dataset=load_dataset("Multimodal-Fatima/OK-VQA_train"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
file_path = hf_hub_download(repo_id=Dataset, repo_type="dataset")
|
14 |
image = Image.open(file_path).convert("RGB")
|
|
|
8 |
processor = AutoProcessor.from_pretrained("microsoft/git-base-vqav2")
|
9 |
model = AutoModelForCausalLM.from_pretrained("microsoft/git-base-vqav2")
|
10 |
|
11 |
+
dataset=load_dataset("Multimodal-Fatima/OK-VQA_train")
|
12 |
+
Dataset({
|
13 |
+
features:['image', 'answers','question'],
|
14 |
+
num_rows: 50
|
15 |
+
})
|
16 |
+
|
17 |
+
{'image':Image(decode=True,id=None),
|
18 |
+
'answers':Sequence(feature=Value(dtype='int64',id_None),length=-1,id=None),
|
19 |
+
'question':Value(dtype='string',id=None)}
|
20 |
+
|
21 |
+
Dataset({
|
22 |
+
features:['input_ids','attention_mask','pixel_values','pixel_mask','labels'],
|
23 |
+
num_rows:50
|
24 |
+
})
|
25 |
|
26 |
file_path = hf_hub_download(repo_id=Dataset, repo_type="dataset")
|
27 |
image = Image.open(file_path).convert("RGB")
|