JPMadsen commited on
Commit
04c9f1e
·
1 Parent(s): 705dda3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -6,15 +6,15 @@ import subprocess
6
  def inference(audio):
7
 
8
  os.makedirs("out", exist_ok=True)
9
- write('test2.wav', audio[0], audio[1])
10
 
11
- command = "demucs -n mdx_extra_q -d cpu test.wav -o out"
12
- process = subprocess.run(command, shell=True, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
13
-
14
- print("Demucs script output:", process.stdout.decode())
15
-
16
- result = os.system("demucs -n mdx_extra_q -d cpu test.wav -o out")
17
- print(f"Demucs script result: {result}")
18
 
19
  # Check if files exist before returning
20
  files = ["./out/mdx_extra_q/test/vocals.wav",
@@ -51,5 +51,5 @@ demo = gr.Interface(
51
 
52
  )
53
 
54
- demo.queue(concurrency_count = 3)
55
  demo.launch()
 
6
  def inference(audio):
7
 
8
  os.makedirs("out", exist_ok=True)
9
+ write('mix.wav', audio[0], audio[1])
10
 
11
+ command = "demucs -n mdx_extra_q -d cpu mix.wav -o out"
12
+ process = subprocess.run(command,
13
+ shell=True,
14
+ stdin=subprocess.DEVNULL,
15
+ stdout=subprocess.PIPE,
16
+ stderr=subprocess.PIPE
17
+ )
18
 
19
  # Check if files exist before returning
20
  files = ["./out/mdx_extra_q/test/vocals.wav",
 
51
 
52
  )
53
 
54
+ demo.queue(concurrency_count = 10)
55
  demo.launch()