Spaces:
Sleeping
Sleeping
Spark Chou
commited on
Commit
·
d6af388
1
Parent(s):
f8a1dbd
new
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ from concurrent.futures import ThreadPoolExecutor, TimeoutError as FutureTimeout
|
|
| 16 |
# Load dataset from HuggingFace
|
| 17 |
dataset = load_dataset("intersteller2887/Turing-test-dataset-en", split="train")
|
| 18 |
dataset = dataset.cast_column("audio", Audio(decode=False)) # Prevent calling 'torchcodec' from newer version of 'datasets'
|
| 19 |
-
|
| 20 |
# Huggingface space working directory: "/home/user/app"
|
| 21 |
target_audio_dir = "/home/user/app/audio"
|
| 22 |
os.makedirs(target_audio_dir, exist_ok=True)
|
|
@@ -38,8 +38,8 @@ for item in dataset:
|
|
| 38 |
all_data_audio_paths = local_audio_paths
|
| 39 |
|
| 40 |
# Take first file of the datasets as sample
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
# ==============================================================================
|
| 45 |
# Data Definition
|
|
|
|
| 16 |
# Load dataset from HuggingFace
|
| 17 |
dataset = load_dataset("intersteller2887/Turing-test-dataset-en", split="train")
|
| 18 |
dataset = dataset.cast_column("audio", Audio(decode=False)) # Prevent calling 'torchcodec' from newer version of 'datasets'
|
| 19 |
+
|
| 20 |
# Huggingface space working directory: "/home/user/app"
|
| 21 |
target_audio_dir = "/home/user/app/audio"
|
| 22 |
os.makedirs(target_audio_dir, exist_ok=True)
|
|
|
|
| 38 |
all_data_audio_paths = local_audio_paths
|
| 39 |
|
| 40 |
# Take first file of the datasets as sample
|
| 41 |
+
sample1_audio_path = local_audio_paths[0]
|
| 42 |
+
print(sample1_audio_path)
|
| 43 |
|
| 44 |
# ==============================================================================
|
| 45 |
# Data Definition
|