Datasets:
License:
Added logging
Browse files- beatbox.py +11 -8
beatbox.py
CHANGED
@@ -28,7 +28,7 @@ _HOMEPAGE = "https://doi.org/10.1007/978-3-031-05981-0_14"
|
|
28 |
|
29 |
_LICENSE = "MIT"
|
30 |
|
31 |
-
_DATA_URL = "https://huggingface.co/datasets/maxardito/beatbox/resolve/main/
|
32 |
|
33 |
|
34 |
class BeatboxDataset(datasets.GeneratorBasedBuilder):
|
@@ -100,14 +100,17 @@ class BeatboxDataset(datasets.GeneratorBasedBuilder):
|
|
100 |
metadata = {}
|
101 |
with open(metadata_path, "r", encoding="utf-8") as f:
|
102 |
reader = csv.DictReader(f)
|
|
|
103 |
for row in reader:
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
111 |
id_ = 0
|
112 |
for path, f in audio_files:
|
113 |
if path in metadata:
|
|
|
28 |
|
29 |
_LICENSE = "MIT"
|
30 |
|
31 |
+
_DATA_URL = "https://huggingface.co/datasets/maxardito/beatbox/resolve/main/data"
|
32 |
|
33 |
|
34 |
class BeatboxDataset(datasets.GeneratorBasedBuilder):
|
|
|
100 |
metadata = {}
|
101 |
with open(metadata_path, "r", encoding="utf-8") as f:
|
102 |
reader = csv.DictReader(f)
|
103 |
+
print("Metadata Path: ", metadata_path)
|
104 |
for row in reader:
|
105 |
+
if self.config.name == "_all_":
|
106 |
+
print("Row[path]: ", row["path"])
|
107 |
+
row["path"] = os.path.join(path_to_clips, row["path"])
|
108 |
+
# if data is incomplete, fill with empty values
|
109 |
+
for field in data_fields:
|
110 |
+
print("Field: ", field)
|
111 |
+
if field not in row:
|
112 |
+
row[field] = ""
|
113 |
+
metadata[row["path"]] = row
|
114 |
id_ = 0
|
115 |
for path, f in audio_files:
|
116 |
if path in metadata:
|