Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,17 +8,17 @@ from huggingface_hub import HfApi
|
|
| 8 |
|
| 9 |
dataset = load_dataset("intersteller2887/Turing-test-dataset", split="train")
|
| 10 |
|
| 11 |
-
|
| 12 |
item["audio"]["path"]
|
| 13 |
for item in dataset
|
| 14 |
if item["audio"] and "path" in item["audio"]
|
| 15 |
]
|
| 16 |
|
| 17 |
print("Found audio files:")
|
| 18 |
-
for path in
|
| 19 |
print(path)
|
| 20 |
|
| 21 |
-
valid_audio_paths = [path for path in
|
| 22 |
print(f"Total valid audio files: {len(valid_audio_paths)}")
|
| 23 |
|
| 24 |
sample1_audio_path = next((p for p in all_data_audio_paths if p.endswith("sample1.wav")), None)
|
|
|
|
| 8 |
|
| 9 |
dataset = load_dataset("intersteller2887/Turing-test-dataset", split="train")
|
| 10 |
|
| 11 |
+
all_data_audio_paths = [
|
| 12 |
item["audio"]["path"]
|
| 13 |
for item in dataset
|
| 14 |
if item["audio"] and "path" in item["audio"]
|
| 15 |
]
|
| 16 |
|
| 17 |
print("Found audio files:")
|
| 18 |
+
for path in all_data_audio_paths[:5]:
|
| 19 |
print(path)
|
| 20 |
|
| 21 |
+
valid_audio_paths = [path for path in all_data_audio_paths if os.path.exists(path)]
|
| 22 |
print(f"Total valid audio files: {len(valid_audio_paths)}")
|
| 23 |
|
| 24 |
sample1_audio_path = next((p for p in all_data_audio_paths if p.endswith("sample1.wav")), None)
|