sheikh commited on
Commit
5c550d7
·
1 Parent(s): ce8fefa

Update SLR.py

Browse files
Files changed (1) hide show
  1. SLR.py +2 -2
SLR.py CHANGED
@@ -101,7 +101,7 @@ class SLR(datasets.GeneratorBasedBuilder):
101
  ann_dir = os.path.join(filepath, "annotations")
102
  img_dir = os.path.join(filepath, "images")
103
  for guid, file in enumerate(sorted(os.listdir(ann_dir))):
104
- #words=[]
105
  tokens = []
106
  bboxes = []
107
  ner_tags = []
@@ -121,4 +121,4 @@ class SLR(datasets.GeneratorBasedBuilder):
121
  bbox=item['bbox']
122
  bboxes.append(bbox)
123
 
124
- yield guid, {"id": str(guid), "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image_path": image_path, "image": image}
 
101
  ann_dir = os.path.join(filepath, "annotations")
102
  img_dir = os.path.join(filepath, "images")
103
  for guid, file in enumerate(sorted(os.listdir(ann_dir))):
104
+ words=[]
105
  tokens = []
106
  bboxes = []
107
  ner_tags = []
 
121
  bbox=item['bbox']
122
  bboxes.append(bbox)
123
 
124
+ yield guid, {"id": str(guid), "words": words , "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image_path": image_path, "image": image}