from datasets import Dataset, DatasetDict | |
def load_dataset(): | |
data = { | |
"train": { | |
"input_image": ["input_image/image1.jpeg"], | |
"conditioning_image": ["conditioning_image/image1.jpeg"], | |
"image_caption": ["Example caption"], | |
}, | |
# Add more samples here | |
} | |
dataset_dict = DatasetDict({split: Dataset.from_dict(samples) for split, samples in data.items()}) | |
return dataset_dict | |