sheikh commited on
Commit
d5cd359
·
1 Parent(s): 8aee0b1

Update SLR.py

Browse files
Files changed (1) hide show
  1. SLR.py +2 -1
SLR.py CHANGED
@@ -112,7 +112,8 @@ class SLR(datasets.GeneratorBasedBuilder):
112
  image_path = os.path.join(img_dir, file)
113
  image_path = image_path.replace("json", "jpg")
114
  image, size = load_image(image_path)
115
- for item in data[0]:
 
116
 
117
  labels=item['label']
118
  word=item['text']
 
112
  image_path = os.path.join(img_dir, file)
113
  image_path = image_path.replace("json", "jpg")
114
  image, size = load_image(image_path)
115
+ for state in data:
116
+ for item in state['form']:
117
 
118
  labels=item['label']
119
  word=item['text']