take off everything related to image path
Browse files
SNLIVE.py
CHANGED
@@ -107,7 +107,7 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
|
|
107 |
},
|
108 |
}
|
109 |
snli_ve_annotation_path = dl_manager.download_and_extract(urls)
|
110 |
-
images_path = dl_manager.download_and_extract(JZ_FOLDER_PATH)
|
111 |
|
112 |
return [
|
113 |
datasets.SplitGenerator(
|
@@ -140,9 +140,9 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
|
|
140 |
for elem in json_file:
|
141 |
elem = json.loads(elem)
|
142 |
img_filename = str(elem["Flickr30K_ID"]) + ".jpg"
|
143 |
-
assert os.path.exists(os.path.join(images_path, img_filename))
|
144 |
record = {
|
145 |
-
"image": os.path.join(images_path, img_filename),
|
146 |
"filename": img_filename,
|
147 |
"premise": elem["sentence1"],
|
148 |
"hypothesis": elem["sentence2"],
|
|
|
107 |
},
|
108 |
}
|
109 |
snli_ve_annotation_path = dl_manager.download_and_extract(urls)
|
110 |
+
images_path = "" # dl_manager.download_and_extract(JZ_FOLDER_PATH)
|
111 |
|
112 |
return [
|
113 |
datasets.SplitGenerator(
|
|
|
140 |
for elem in json_file:
|
141 |
elem = json.loads(elem)
|
142 |
img_filename = str(elem["Flickr30K_ID"]) + ".jpg"
|
143 |
+
# assert os.path.exists(os.path.join(images_path, img_filename))
|
144 |
record = {
|
145 |
+
# "image": os.path.join(images_path, img_filename),
|
146 |
"filename": img_filename,
|
147 |
"premise": elem["sentence1"],
|
148 |
"hypothesis": elem["sentence2"],
|