owiedotch commited on
Commit
7cbf8ae
1 Parent(s): 1cfa594

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
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
- sources = apply_model(separator, wav, device=device, progress=True)
42
- sources = sources * ref.view(1, -1) + ref.view(1, -1)
 
 
 
 
 
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])