Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,13 @@ def inference(audio_file: str, model_name: str, vocals: bool, drums: bool, bass:
|
|
38 |
ref = wav.mean(0)
|
39 |
wav = (wav - ref.view(1, -1))
|
40 |
yield None, stream_log("Audio loaded successfully. Applying model...")
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
yield None, stream_log("Model applied. Processing stems...")
|
44 |
|
45 |
output_dir: str = os.path.join("separated", model_name, os.path.splitext(os.path.basename(audio_file))[0])
|
|
|
38 |
ref = wav.mean(0)
|
39 |
wav = (wav - ref.view(1, -1))
|
40 |
yield None, stream_log("Audio loaded successfully. Applying model...")
|
41 |
+
|
42 |
+
# Update the apply_model call with only the required arguments
|
43 |
+
sources = apply_model(separator, wav.to(device))
|
44 |
+
|
45 |
+
# Remove the line that was causing the issue
|
46 |
+
# sources = sources * ref.view(1, -1) + ref.view(1, -1)
|
47 |
+
|
48 |
yield None, stream_log("Model applied. Processing stems...")
|
49 |
|
50 |
output_dir: str = os.path.join("separated", model_name, os.path.splitext(os.path.basename(audio_file))[0])
|