Idor980 commited on
Commit
816a21c
1 Parent(s): bc80b24

Update diffusiondb_prompts_and_images_dataset.py

Browse files
diffusiondb_prompts_and_images_dataset.py CHANGED
@@ -73,25 +73,4 @@ Demo dataset for testing or showing image-text capabilities.
73
  "image": {"path": filepath, "bytes": image.read()},
74
  }
75
  idx_counter += 1
76
-
77
- # def _generate_examples(self, images, parquet_file):
78
- # df = pd.read_parquet(parquet_file)
79
- # idx_counter = 0
80
- # for idx, (filepath, image) in enumerate(images):
81
- # image_name = filepath.split('/')[-1]
82
- # target_row = df[df['path'].str.contains(image_name, na=False)]
83
- # if not target_row.empty:
84
- # prompt_list = target_row['prompt'].tolist()
85
- # seed_list = target_row['seed'].tolist()
86
- # cfg_list = target_row['cfg'].tolist()
87
- # step_list = target_row['step'].tolist()
88
- # image_bytes = image.read()
89
- # for i in range(len(prompt_list)):
90
- # yield idx_counter, {
91
- # "prompt": prompt_list[i],
92
- # "seed": seed_list[i],
93
- # "cfg": cfg_list[i],
94
- # "step": step_list[i],
95
- # "image": {"path": filepath, "bytes": image_bytes},
96
- # }
97
- # idx_counter += 1
 
73
  "image": {"path": filepath, "bytes": image.read()},
74
  }
75
  idx_counter += 1
76
+