Adding a new dataset

The Hub is home to an extensive collection of community-curated and popular research datasets. We encourage you to share your dataset to the Hub to help grow the ML community and accelerate progress for everyone. All contributions are welcome; adding a dataset is just a drag and drop away!

Start by creating a Hugging Face Hub account if you don’t have one yet.

Upload with the Hub UI

The Hub’s web-based interface allows users without any developer experience to upload a dataset.

Create a repository

A repository hosts all your dataset files, including the revision history, making storing more than one dataset version possible.

  1. Click on your profile and select New Dataset to create a new dataset repository.
  2. Pick a name for your dataset, and choose whether it is a public or private dataset. A public dataset is visible to anyone, whereas a private dataset can only be viewed by you or members of your organization.

Upload dataset

  1. Once you’ve created a repository, navigate to the Files and versions tab to add a file. Select Add file to upload your dataset files. We support many text, audio, and image data extensions such as .csv, .mp3, and .jpg among many others.
  1. Drag and drop your dataset files.
  1. After uploading your dataset files, they are stored in your dataset repository.

Create a Dataset card

Adding a Dataset card is super valuable for helping users find your dataset and understand how to use it responsibly.

  1. Click on Create Dataset Card to create a Dataset card. This button creates a README.md file in your repository.
  1. At the top, you’ll see the Metadata UI with several fields to select from such as license, language, and task categories. These are the most important tags for helping users discover your dataset on the Hub (when applicable). When you select an option for a field, it will be automatically added to the top of the dataset card.

    You can also look at the Dataset Card specifications, which has a complete set of (but not required) tag options like annotations_creators, to help you choose the appropriate tags.

  1. Write your dataset documentation in the Dataset Card to introduce your dataset to the community and help users understand how to use it.

    You can click on the Import dataset card template link at the top of the editor to automatically create a dataset card template. For a detailed example of what a good Dataset card should look like, take a look at the CNN DailyMail Dataset card.

Dataset Viewer

The Dataset Viewer is crucial to know what the data actually look like. It is generally enabled by default for any dataset, depending on the dataset structure.

Make sure the Dataset Viewer correctly shows your data, or Configure the Dataset Viewer.

Using the huggingface_hub client library

The rich features set in the huggingface_hub library allows you to manage repositories, including creating repos and uploading datasets to the Model Hub. Visit the client library’s documentation to learn more.

Using other libraries

Some libraries like 🤗 Datasets, Pandas, Dask or DuckDB can upload files to the Hub. See the list of Libraries supported by the Datasets Hub for more information.

Using Git

Since dataset repos are just Git repositories, you can use Git to push your data files to the Hub. Follow the guide on Getting Started with Repositories to learn about using the git CLI to commit and push your datasets.