Datasets:

License:
Leyo commited on
Commit
5a3bd07
1 Parent(s): 2659279

fix jsonl loading

Browse files
Files changed (1) hide show
  1. SNLIVE.py +1 -0
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, {