File size: 531 Bytes
08b5440 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# 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)
|