Datasets:

Languages:
English
ArXiv:
License:
yasumasaonoe commited on
Commit
866639d
·
verified ·
1 Parent(s): 78b62e0

Update docci.py

Browse files
Files changed (1) hide show
  1. docci.py +2 -2
docci.py CHANGED
@@ -107,7 +107,7 @@ class DOCCI(datasets.GeneratorBasedBuilder):
107
  with open(data["descriptions"], "r") as f:
108
  examples = [json.loads(l.strip()) for l in f]
109
 
110
- for ex in annotations["images"]:
111
  if split == "train":
112
  if not (ex["split"] == "train" and ex['example_id'].startswith("train")):
113
  continue
@@ -134,7 +134,7 @@ class DOCCI(datasets.GeneratorBasedBuilder):
134
  yield _ex["example_id"], _ex
135
 
136
  def _generate_examples_docci_aar(self, data, split):
137
- image_files = glob.glob(data[split])
138
 
139
  for image_path in image_files:
140
 
 
107
  with open(data["descriptions"], "r") as f:
108
  examples = [json.loads(l.strip()) for l in f]
109
 
110
+ for ex in examples:
111
  if split == "train":
112
  if not (ex["split"] == "train" and ex['example_id'].startswith("train")):
113
  continue
 
134
  yield _ex["example_id"], _ex
135
 
136
  def _generate_examples_docci_aar(self, data, split):
137
+ image_files = glob.glob(data["images"])
138
 
139
  for image_path in image_files:
140