fix jsonl loading
Browse files
SNLIVE.py
CHANGED
|
@@ -142,6 +142,7 @@ class SNLIVE(datasets.GeneratorBasedBuilder):
|
|
| 142 |
with open(snli_ve_annotation_path, "r", encoding="utf-8") as json_file:
|
| 143 |
data = list(json_file)
|
| 144 |
for elem in data:
|
|
|
|
| 145 |
img_filename = str(elem["Flickr30K_ID"]) + ".jpg"
|
| 146 |
assert os.path.exists(os.path.join(images_path, img_filename))
|
| 147 |
yield counter, {
|
|
|
|
| 142 |
with open(snli_ve_annotation_path, "r", encoding="utf-8") as json_file:
|
| 143 |
data = list(json_file)
|
| 144 |
for elem in data:
|
| 145 |
+
elem = json.loads(elem)
|
| 146 |
img_filename = str(elem["Flickr30K_ID"]) + ".jpg"
|
| 147 |
assert os.path.exists(os.path.join(images_path, img_filename))
|
| 148 |
yield counter, {
|