animelover commited on
Commit
c3fe35c
·
1 Parent(s): ce73404

Update scenery-images.py

Browse files
Files changed (1) hide show
  1. scenery-images.py +2 -2
scenery-images.py CHANGED
@@ -46,7 +46,7 @@ class DanbooruDataset(datasets.GeneratorBasedBuilder):
46
  if os.path.splitext(fname)[1].lower() in _EXTENSION)
47
  for image_fname in image_fnames:
48
  image_path = os.path.join(path, image_fname)
49
- tags_path = os.path.splitext(image_path)[0] + ".txt"
50
  with open(tags_path, "r", encoding="utf-8") as f:
51
  tags = f.read()
52
- yield image_fname, {"image": image_path, "tags": tags}
 
46
  if os.path.splitext(fname)[1].lower() in _EXTENSION)
47
  for image_fname in image_fnames:
48
  image_path = os.path.join(path, image_fname)
49
+ tags_path = os.path.join(path, os.path.splitext(image_fname)[0] + ".txt")
50
  with open(tags_path, "r", encoding="utf-8") as f:
51
  tags = f.read()
52
+ yield image_fname, {"image": image_path, "tags": tags}