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

Update app.py

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