michelecafagna26 commited on
Commit
f56d96d
1 Parent(s): 97f6d6b

Update hl.py

Browse files
Files changed (1) hide show
  1. hl.py +3 -3
hl.py CHANGED
@@ -116,9 +116,9 @@ class HL(datasets.GeneratorBasedBuilder):
116
  # Annotation files come first, then the images.
117
  for img_file_path, img_obj in images:
118
 
119
- if img_file_path in metadata:
120
- file_name = Path(img_file_path).name
121
-
122
  yield idx, {
123
  "file_name": file_name,
124
  "image": {"path": img_file_path, "bytes": img_obj.read()},
 
116
  # Annotation files come first, then the images.
117
  for img_file_path, img_obj in images:
118
 
119
+ file_name = Path(img_file_path).name
120
+
121
+ if file_name in metadata:
122
  yield idx, {
123
  "file_name": file_name,
124
  "image": {"path": img_file_path, "bytes": img_obj.read()},