apal commited on
Commit
36fdcdc
·
1 Parent(s): b9c21f0

generate examples loop

Browse files
Files changed (1) hide show
  1. SkyScenes.py +5 -4
SkyScenes.py CHANGED
@@ -910,10 +910,11 @@ class SKYSCENES(datasets.GeneratorBasedBuilder):
910
 
911
  def _generate_examples(self, images=None):
912
  """Generate images and labels for splits."""
913
- for file_path, file_obj in images:
914
- yield file_path, {
915
- "image": {"path": file_path, "bytes": file_obj.read()},
916
- }
 
917
  # for j in range(len(images)):
918
  # dict_final = {}
919
  # filepath_img = os.listdir(images[j])
 
910
 
911
  def _generate_examples(self, images=None):
912
  """Generate images and labels for splits."""
913
+ for f in images:
914
+ for file_path, file_obj in f:
915
+ yield file_path, {
916
+ "image": {"path": file_path, "bytes": file_obj.read()},
917
+ }
918
  # for j in range(len(images)):
919
  # dict_final = {}
920
  # filepath_img = os.listdir(images[j])