Datasets:
Size:
10K<n<100K
License:
George
commited on
Commit
•
7d231ae
1
Parent(s):
147be26
fix _calc_label to support windows
Browse files- music_genre.py +3 -0
music_genre.py
CHANGED
@@ -123,6 +123,9 @@ class music_genre(datasets.GeneratorBasedBuilder):
|
|
123 |
|
124 |
labstr = dirpath[substr_index + len(mel):]
|
125 |
labs = labstr.split('/')
|
|
|
|
|
|
|
126 |
if depth <= len(labs):
|
127 |
return int(labs[depth - 1].split('_')[0])
|
128 |
else:
|
|
|
123 |
|
124 |
labstr = dirpath[substr_index + len(mel):]
|
125 |
labs = labstr.split('/')
|
126 |
+
if len(labs) == 0:
|
127 |
+
labs = labstr.split('\\')
|
128 |
+
|
129 |
if depth <= len(labs):
|
130 |
return int(labs[depth - 1].split('_')[0])
|
131 |
else:
|