Spaces:
Sleeping
Sleeping
ibcplateformes Claude Opus 4.6 commited on
Commit ·
0ead6d9
1
Parent(s): 7298123
Import all @spaces.GPU functions at top level for ZeroGPU detection
Browse filesseparate_audio and convert_voice were imported lazily, preventing
ZeroGPU from detecting them at startup. Now all GPU functions are
imported at module level.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -42,6 +42,8 @@ else:
|
|
| 42 |
|
| 43 |
# ── Import GPU-decorated functions at top level for ZeroGPU detection ───────
|
| 44 |
from pipeline.training import full_training_pipeline, extract_features, train_model
|
|
|
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
# ── Training Tab ─────────────────────────────────────────────────────────────
|
|
@@ -112,8 +114,6 @@ def convert_song(
|
|
| 112 |
if model_choice == "(aucun modèle entraîné)" or not model_choice:
|
| 113 |
return "Erreur : Veuillez d'abord entraîner un modèle vocal.", None, None, None
|
| 114 |
|
| 115 |
-
from pipeline.separation import separate_audio
|
| 116 |
-
from pipeline.inference import convert_voice
|
| 117 |
from pipeline.mixing import mix_audio
|
| 118 |
|
| 119 |
try:
|
|
|
|
| 42 |
|
| 43 |
# ── Import GPU-decorated functions at top level for ZeroGPU detection ───────
|
| 44 |
from pipeline.training import full_training_pipeline, extract_features, train_model
|
| 45 |
+
from pipeline.separation import separate_audio
|
| 46 |
+
from pipeline.inference import convert_voice
|
| 47 |
|
| 48 |
|
| 49 |
# ── Training Tab ─────────────────────────────────────────────────────────────
|
|
|
|
| 114 |
if model_choice == "(aucun modèle entraîné)" or not model_choice:
|
| 115 |
return "Erreur : Veuillez d'abord entraîner un modèle vocal.", None, None, None
|
| 116 |
|
|
|
|
|
|
|
| 117 |
from pipeline.mixing import mix_audio
|
| 118 |
|
| 119 |
try:
|