Update app.py
Browse files
app.py
CHANGED
@@ -15,9 +15,15 @@ import torchaudio
|
|
15 |
import torch
|
16 |
|
17 |
# Fix: Add trust_remote_code=True
|
|
|
|
|
|
|
|
|
|
|
18 |
dataset = load_dataset("librispeech_asr", "clean", split="train", trust_remote_code=True)
|
19 |
|
20 |
|
|
|
21 |
# Function to load & resample audio
|
22 |
def preprocess_audio(batch):
|
23 |
audio = batch["audio"]
|
|
|
15 |
import torch
|
16 |
|
17 |
# Fix: Add trust_remote_code=True
|
18 |
+
import fsspec
|
19 |
+
|
20 |
+
# Set a higher timeout limit
|
21 |
+
fsspec.config.conf["timeout"] = 20000 # minutes
|
22 |
+
|
23 |
dataset = load_dataset("librispeech_asr", "clean", split="train", trust_remote_code=True)
|
24 |
|
25 |
|
26 |
+
|
27 |
# Function to load & resample audio
|
28 |
def preprocess_audio(batch):
|
29 |
audio = batch["audio"]
|