# See https://huggingface.co/docs/datasets/audio_dataset | |
from datasets import load_dataset | |
# Upload the have_one dataset to the hub | |
# This magically does the right thing, including | |
# setting the label names and IDs. | |
ds = load_dataset("audiofolder", data_dir="have_one/data") | |
ds2 = ds.train_test_split(test_size=0.15) | |
ds3 = ds2['train'].train_test_split(test_size=0.18) | |
ds2['validation'] = ds3['test'] | |
from huggingface_hub import login | |
login() | |
ds2.push_to_hub("MatsRooth/have_one",private=False,embed_external_files=True) | |