Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
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."
|
|
|
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."
|