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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 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
 
 
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