sheikh commited on
Commit
4857e17
·
1 Parent(s): d70cb6f

Update SLR.py

Browse files
Files changed (1) hide show
  1. SLR.py +2 -1
SLR.py CHANGED
@@ -114,9 +114,10 @@ class SLR(datasets.GeneratorBasedBuilder):
114
  for item in data['categories']:
115
 
116
  labels=item['name']
 
117
  ner_tags.append(labels)
118
  for item in data['annotations']:
119
  bbox=item['bbox']
120
  bboxes.append(bbox)
121
 
122
- yield guid, {"id": str(guid),"words":words, "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image": image, "image_path": image_path}
 
114
  for item in data['categories']:
115
 
116
  labels=item['name']
117
+ words.append(item['name'])
118
  ner_tags.append(labels)
119
  for item in data['annotations']:
120
  bbox=item['bbox']
121
  bboxes.append(bbox)
122
 
123
+ yield guid, {"id": str(guid), "words":words, "tokens": tokens, "bboxes": bboxes, "ner_tags": ner_tags, "image": image, "image_path": image_path}