Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,11 @@ os.environ["TORCH_HOME"] = "/tmp/torch"
|
|
| 6 |
os.makedirs("/tmp/torch", exist_ok=True)
|
| 7 |
|
| 8 |
# Preload Silero VAD to avoid runtime issues
|
| 9 |
-
try:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
except Exception as e:
|
| 13 |
-
|
| 14 |
|
| 15 |
# Now proceed with the rest of the imports
|
| 16 |
from openvoice import se_extractor
|
|
|
|
| 6 |
os.makedirs("/tmp/torch", exist_ok=True)
|
| 7 |
|
| 8 |
# Preload Silero VAD to avoid runtime issues
|
| 9 |
+
# try:
|
| 10 |
+
# torch.hub.load(repo_or_dir="snakers4/silero-vad", model="silero_vad", trust_repo=True)
|
| 11 |
+
# print("Silero VAD model preloaded successfully.")
|
| 12 |
+
# except Exception as e:
|
| 13 |
+
# print(f"Failed to preload Silero VAD: {e}")
|
| 14 |
|
| 15 |
# Now proceed with the rest of the imports
|
| 16 |
from openvoice import se_extractor
|