from datasets import load_dataset, Dataset | |
data_files = ['/Users/alexandrelordelo/CG2RealDataset2/CG2RealDataset.csv'] | |
dataset = load_dataset( | |
'csv', | |
data_files=data_files, | |
column_names=["input_image", "conditioning_image", "image_caption"], | |
delimiter=',', | |
quotechar='"', | |
quoting=0, | |
) | |
dataset = Dataset.from_dict(dataset) # Convert the dataset to a Hugging Face Dataset object | |
dataset.save_to_disk('/Users/alexandrelordelo/CG2RealDataset2/CG2RealDataset') # Save the dataset to a folder | |