Spaces:
Running
Running
no
Browse files- app.py +0 -13
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,16 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
-
|
| 3 |
-
# 🚫 Fix for Hugging Face Spaces (T4 GPU) Node.js error:
|
| 4 |
-
# Prevents `/usr/bin/node: bad option: --import` by disabling Node UI spawning
|
| 5 |
-
os.environ["GRADIO_LAUNCH_METHOD"] = "headless"
|
| 6 |
-
os.environ["GRADIO_SKIP_JS_SETUP"] = "1"
|
| 7 |
-
os.environ["GRADIO_ALLOW_LEGACY_NODE_LAUNCH"] = "1"
|
| 8 |
-
os.environ["GRADIO_NODE_LAUNCH_METHOD"] = "legacy"
|
| 9 |
-
os.environ["GRADIO_DISABLE_ANALYTICS"] = "1"
|
| 10 |
-
|
| 11 |
-
# Optional: force CPU-safe start until GPU ready (for smoother init)
|
| 12 |
-
os.environ["TORCH_CUDA_ARCH_LIST"] = "8.6"
|
| 13 |
-
|
| 14 |
import random
|
| 15 |
import numpy as np
|
| 16 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import random
|
| 2 |
import numpy as np
|
| 3 |
import torch
|
requirements.txt
CHANGED
|
@@ -9,7 +9,7 @@ numpy==1.26.0
|
|
| 9 |
resampy==0.4.3
|
| 10 |
librosa==0.10.0
|
| 11 |
soundfile
|
| 12 |
-
gradio==4.
|
| 13 |
spaces==0.26.1
|
| 14 |
tqdm
|
| 15 |
|
|
|
|
| 9 |
resampy==0.4.3
|
| 10 |
librosa==0.10.0
|
| 11 |
soundfile
|
| 12 |
+
gradio==4.20.1 # ✅ Node-free stable build for T4 GPU (no "--import" issue)
|
| 13 |
spaces==0.26.1
|
| 14 |
tqdm
|
| 15 |
|