alkzar90 commited on
Commit
ddf25eb
1 Parent(s): 217a7da

Add the _generate_examples method

Browse files
Files changed (1) hide show
  1. NIH-Chest-X-ray-dataset.py +8 -3
NIH-Chest-X-ray-dataset.py CHANGED
@@ -135,7 +135,12 @@ class XChest(datasets.GeneratorBasedBuilder):
135
  ]
136
 
137
  def _generate_examples(self, files):
138
- pass
139
-
140
-
 
 
 
 
 
141
 
 
135
  ]
136
 
137
  def _generate_examples(self, files):
138
+ for i, path in enumerate(files):
139
+ file_name = os.path.basename(path)
140
+ if file_namae.endswith(".png"):
141
+ yield i, {
142
+ "image_file_path": path,
143
+ "image": path,
144
+ "labels": "a",
145
+ }
146