Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,10 +39,10 @@ def inference(audio_file: str, model_name: str, vocals: bool, drums: bool, bass:
|
|
39 |
wav = (wav - ref.view(1, -1))
|
40 |
yield None, stream_log("Audio loaded successfully. Applying model...")
|
41 |
|
42 |
-
#
|
43 |
-
sources =
|
44 |
|
45 |
-
# Process the sources
|
46 |
sources = [source * ref.view(1, -1) + ref.view(1, -1) for source in sources]
|
47 |
|
48 |
yield None, stream_log("Model applied. Processing stems...")
|
|
|
39 |
wav = (wav - ref.view(1, -1))
|
40 |
yield None, stream_log("Audio loaded successfully. Applying model...")
|
41 |
|
42 |
+
# Use apply_model as a standalone function
|
43 |
+
sources = apply_model(separator, wav.to(device), device=device)
|
44 |
|
45 |
+
# Process the sources
|
46 |
sources = [source * ref.view(1, -1) + ref.view(1, -1) for source in sources]
|
47 |
|
48 |
yield None, stream_log("Model applied. Processing stems...")
|