Search code examples
huggingface-transformershuggingface-datasets

How to load custom dataset from CSV in Huggingfaces


I would like to load a custom dataset from csv using huggingfaces-transformers


Solution

  • From https://huggingface.co/docs/datasets/loading_datasets.html#loading-from-local-files

    dataset = load_dataset('csv', data_files={'train': "train_set.csv",'test': "test_set.csv"})