Update gadme.py
Browse files
gadme.py
CHANGED
@@ -408,7 +408,7 @@ class BirdSet(datasets.GeneratorBasedBuilder):
|
|
408 |
for i, audio_archive_iterator in enumerate(audio_archive_iterators):
|
409 |
for audio_path_in_archive, audio_file in audio_archive_iterator:
|
410 |
id = os.path.split(audio_path_in_archive)[-1]
|
411 |
-
rows = metadata.
|
412 |
audio_path = os.path.join(local_audio_archives_paths[i], audio_path_in_archive) if local_audio_archives_paths else audio_path_in_archive
|
413 |
|
414 |
audio = audio_path if local_audio_archives_paths else audio_file.read()
|
|
|
408 |
for i, audio_archive_iterator in enumerate(audio_archive_iterators):
|
409 |
for audio_path_in_archive, audio_file in audio_archive_iterator:
|
410 |
id = os.path.split(audio_path_in_archive)[-1]
|
411 |
+
rows = metadata[metadata.index == (int(id[2:].split(".")[0]) if split == "train" else id)]
|
412 |
audio_path = os.path.join(local_audio_archives_paths[i], audio_path_in_archive) if local_audio_archives_paths else audio_path_in_archive
|
413 |
|
414 |
audio = audio_path if local_audio_archives_paths else audio_file.read()
|