CG2RealDataset3 / load_dataset.py
Alexandre Lordelo
Upload dataset and images to CG2RealDataset3
f4901ba
raw
history blame contribute delete
515 Bytes
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