Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ PRIMARY_COLOR = os.environ.get("PRIMARY_COLOR", "#6B5BFF") # UI accent only
|
|
26 |
MAX_SECS = int(os.environ.get("MAX_SECS", "15")) # keep clips short for ZeroGPU window
|
27 |
TARGET_H = int(os.environ.get("TARGET_H", "480")) # downscale target height
|
28 |
SR = int(os.environ.get("TARGET_SR", "48000")) # WAV sample rate
|
29 |
-
ZEROGPU_DURATION = int(os.environ.get("ZEROGPU_DURATION", "110")) # <= platform
|
30 |
|
31 |
def sh(cmd: str):
|
32 |
print(">>", cmd)
|
@@ -113,13 +113,14 @@ def prepare_once():
|
|
113 |
|
114 |
prepare_once()
|
115 |
|
116 |
-
# ---- Friendly dependency check (
|
117 |
try:
|
118 |
-
import audiotools #
|
119 |
except Exception as e:
|
120 |
raise RuntimeError(
|
121 |
-
"Missing
|
122 |
-
"
|
|
|
123 |
) from e
|
124 |
|
125 |
# Now safe to import their internals
|
|
|
26 |
MAX_SECS = int(os.environ.get("MAX_SECS", "15")) # keep clips short for ZeroGPU window
|
27 |
TARGET_H = int(os.environ.get("TARGET_H", "480")) # downscale target height
|
28 |
SR = int(os.environ.get("TARGET_SR", "48000")) # WAV sample rate
|
29 |
+
ZEROGPU_DURATION = int(os.environ.get("ZEROGPU_DURATION", "110")) # must be <= platform limit
|
30 |
|
31 |
def sh(cmd: str):
|
32 |
print(">>", cmd)
|
|
|
113 |
|
114 |
prepare_once()
|
115 |
|
116 |
+
# ---- Friendly dependency check (correct package name) ------------------------
|
117 |
try:
|
118 |
+
import audiotools # provided by the PyPI package 'descript-audiotools'
|
119 |
except Exception as e:
|
120 |
raise RuntimeError(
|
121 |
+
"Missing module 'audiotools'. Install it via the PyPI package "
|
122 |
+
"'descript-audiotools' (e.g., add 'descript-audiotools>=0.7.2' "
|
123 |
+
"to requirements.txt) and restart the Space."
|
124 |
) from e
|
125 |
|
126 |
# Now safe to import their internals
|