Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,11 @@ 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 |
-
# Update the apply_model call
|
43 |
-
sources = apply_model(
|
44 |
|
45 |
-
#
|
46 |
-
|
47 |
|
48 |
yield None, stream_log("Model applied. Processing stems...")
|
49 |
|
|
|
39 |
wav = (wav - ref.view(1, -1))
|
40 |
yield None, stream_log("Audio loaded successfully. Applying model...")
|
41 |
|
42 |
+
# Update the apply_model call to use it as an instance method
|
43 |
+
sources = separator.apply_model(wav.to(device))
|
44 |
|
45 |
+
# Process the sources (no need to unpack as it's likely returning the correct format now)
|
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...")
|
49 |
|