nakas commited on
Commit
387d68b
1 Parent(s): a92b621

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -4,6 +4,13 @@ from scipy.io.wavfile import write
4
 
5
 
6
  def inference(audio):
 
 
 
 
 
 
 
7
  os.makedirs("out", exist_ok=True)
8
  write('test.wav', audio[0], audio[1])
9
  result = os.system("python3 -m demucs.separate -n mdx_extra_q -d cpu test.wav -o out")
 
4
 
5
 
6
  def inference(audio):
7
+ os.makedirs("out", exist_ok=True)
8
+ write('test.wav', audio[0], audio[1])
9
+
10
+ command = "python3 -m demucs.separate -n mdx_extra_q -d cpu test.wav -o out"
11
+ process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
12
+ print("Demucs script output:", process.stdout.decode())
13
+
14
  os.makedirs("out", exist_ok=True)
15
  write('test.wav', audio[0], audio[1])
16
  result = os.system("python3 -m demucs.separate -n mdx_extra_q -d cpu test.wav -o out")