MatsRooth commited on
Commit
4fad798
1 Parent(s): daaa89b

Upload have_one_hub.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. have_one_hub.py +22 -0
have_one_hub.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # See https://huggingface.co/docs/datasets/audio_dataset
2
+ from datasets import load_dataset
3
+
4
+ # Upload the have_one dataset to the hub
5
+
6
+ # This magically does the right thing, including
7
+ # setting the label names and IDs.
8
+ ds = load_dataset("audiofolder", data_dir="have_one/data")
9
+
10
+ ds2 = ds.train_test_split(test_size=0.15)
11
+
12
+ ds3 = ds2['train'].train_test_split(test_size=0.18)
13
+
14
+ ds2['validation'] = ds3['test']
15
+
16
+ from huggingface_hub import login
17
+ login()
18
+ ds2.push_to_hub("MatsRooth/have_one",private=False,embed_external_files=True)
19
+
20
+
21
+
22
+