K00B404 commited on
Commit
9dda4c2
1 Parent(s): a2b5322

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -29,11 +29,11 @@ model_repo_id = "K00B404/pix2pix_flux"
29
  class Pix2PixDataset(torch.utils.data.Dataset):
30
  def __init__(self, ds):
31
  # Filter dataset for 'original' and 'target' images
32
- self.originals = [x for x in ds["train"] if x['label'] == 'original']
33
- self.targets = [x for x in ds["train"] if x['label'] == 'target']
34
- print(f"nr images{len(ds["train"])}")
35
- print(f"nr 170{ds["train"][170]}")
36
- print(f"nr 171{ds["train"][171]}")
37
 
38
  # Ensure the number of original and target images match
39
  assert len(self.originals) == len(self.targets), "Mismatch in number of original and target images."
 
29
  class Pix2PixDataset(torch.utils.data.Dataset):
30
  def __init__(self, ds):
31
  # Filter dataset for 'original' and 'target' images
32
+ #https://huggingface.co/datasets/K00B404/pix2pix_flux_set/viewer/default/train?f[label][value]=0
33
+ #https://huggingface.co/datasets/K00B404/pix2pix_flux_set/viewer/default/train?f[label][value]=1
34
+ self.originals = [x for x in ds["train"] if x['label'] == 0]
35
+ self.targets = [x for x in ds["train"] if x['label'] == 1]
36
+
37
 
38
  # Ensure the number of original and target images match
39
  assert len(self.originals) == len(self.targets), "Mismatch in number of original and target images."