Spaces:
Running
Running
feat: general analysis route için audio uploads ve YouTube URLs düzeltildi
Browse files- app/routes/analyze.py +2 -2
- requirements.txt +12 -6
app/routes/analyze.py
CHANGED
|
@@ -15,8 +15,8 @@ Endpoints:
|
|
| 15 |
POST /api/analyze/jobs starts a background job, returns its id
|
| 16 |
GET /api/analyze/jobs/{job_id} per-step progress, then the result
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
"""
|
| 21 |
|
| 22 |
from __future__ import annotations
|
|
|
|
| 15 |
POST /api/analyze/jobs starts a background job, returns its id
|
| 16 |
GET /api/analyze/jobs/{job_id} per-step progress, then the result
|
| 17 |
|
| 18 |
+
If the audio can't be decoded or a link can't be downloaded, the
|
| 19 |
+
response has an error code and no result.
|
| 20 |
"""
|
| 21 |
|
| 22 |
from __future__ import annotations
|
requirements.txt
CHANGED
|
@@ -25,16 +25,22 @@ audioread>=3.0.1
|
|
| 25 |
resampy>=0.4.2
|
| 26 |
|
| 27 |
# === CLAP Embeddings (Layer 2 - optional, CPU) ===
|
| 28 |
-
# laion-clap
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# === Data Processing ===
|
| 32 |
-
numpy
|
|
|
|
| 33 |
pandas>=2.1.4
|
| 34 |
scipy>=1.11.4
|
| 35 |
-
scikit-learn
|
| 36 |
-
lightgbm>=4.
|
| 37 |
-
xgboost>=2.0
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# === API & Web ===
|
| 40 |
aiohttp>=3.9.1
|
|
|
|
| 25 |
resampy>=0.4.2
|
| 26 |
|
| 27 |
# === CLAP Embeddings (Layer 2 - optional, CPU) ===
|
| 28 |
+
# laion-clap is deliberately NOT installed: it pins numpy<2, and the AURIS
|
| 29 |
+
# model pickles were saved with numpy 2 (they reference numpy._core), so
|
| 30 |
+
# under numpy 1.x the LightGBM verdict, all 11 voters and the
|
| 31 |
+
# meta-classifier failed to load. Without it the CLAP layer reports its
|
| 32 |
+
# spectral heuristic fallback (layers.clap.mode = "heuristic_spectral").
|
| 33 |
|
| 34 |
# === Data Processing ===
|
| 35 |
+
# Match the versions the models were pickled with (numpy 2.x, scikit-learn 1.8.0).
|
| 36 |
+
numpy>=2.0.0
|
| 37 |
pandas>=2.1.4
|
| 38 |
scipy>=1.11.4
|
| 39 |
+
scikit-learn==1.8.0
|
| 40 |
+
lightgbm>=4.6.0,<5
|
| 41 |
+
xgboost>=3.2.0,<4
|
| 42 |
+
# SHAP TreeExplainer for the per-feature explanation of the verdict.
|
| 43 |
+
shap>=0.48.0
|
| 44 |
|
| 45 |
# === API & Web ===
|
| 46 |
aiohttp>=3.9.1
|