Spaces:
Paused
Paused
giorgio-caparvi
commited on
Commit
·
5c93f7d
1
Parent(s):
2aba367
Fixed json req
Browse files
api/model/src/datasets/vitonhd.py
CHANGED
@@ -78,7 +78,7 @@ class VitonHDDataset(data.Dataset):
|
|
78 |
#self.captions_dict = {k: v for k, v in self.captions_dict.items() if len(v) >= 3}
|
79 |
|
80 |
# Load Captions
|
81 |
-
model_data = self.json_from_req.get('
|
82 |
# Filter captions based on the length requirement (3 or more items)
|
83 |
self.captions_dict = {k: v for k, v in model_data.items() if len(v) >= 3}
|
84 |
|
|
|
78 |
#self.captions_dict = {k: v for k, v in self.captions_dict.items() if len(v) >= 3}
|
79 |
|
80 |
# Load Captions
|
81 |
+
model_data = self.json_from_req.get('vitonhd', {}) # Safely get the 'vitonhd' key, default to an empty dictionary if it doesn't exist
|
82 |
# Filter captions based on the length requirement (3 or more items)
|
83 |
self.captions_dict = {k: v for k, v in model_data.items() if len(v) >= 3}
|
84 |
|