Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -186,22 +186,26 @@ def inference(audio):
|
|
186 |
print("Demucs script output:", process.stdout.decode())
|
187 |
|
188 |
os.makedirs("out", exist_ok=True)
|
189 |
-
|
190 |
-
result = os.system("python3 -m demucs.separate -n mdx_extra_q -d cpu test.wav -o out")
|
191 |
print(f"Demucs script result: {result}")
|
|
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
199 |
if not os.path.isfile(file):
|
200 |
print(f"File not found: {file}")
|
201 |
else:
|
202 |
print(f"File exists: {file}")
|
203 |
|
204 |
-
return
|
205 |
|
206 |
|
207 |
def toggle_audio_src(choice):
|
|
|
186 |
print("Demucs script output:", process.stdout.decode())
|
187 |
|
188 |
os.makedirs("out", exist_ok=True)
|
189 |
+
result = os.system(new_command)
|
|
|
190 |
print(f"Demucs script result: {result}")
|
191 |
+
common_dir = os.path.dirname(audio)
|
192 |
|
193 |
+
files = [
|
194 |
+
"./out/mdx_extra_q/test/vocals.wav",
|
195 |
+
"./out/mdx_extra_q/test/bass.wav",
|
196 |
+
"./out/mdx_extra_q/test/drums.wav",
|
197 |
+
"./out/mdx_extra_q/test/other.wav"
|
198 |
+
]
|
199 |
+
|
200 |
+
modified_files = [os.path.join(common_dir, os.path.basename(file)) for file in files]
|
201 |
+
|
202 |
+
for file in modified_files:
|
203 |
if not os.path.isfile(file):
|
204 |
print(f"File not found: {file}")
|
205 |
else:
|
206 |
print(f"File exists: {file}")
|
207 |
|
208 |
+
return modified_files
|
209 |
|
210 |
|
211 |
def toggle_audio_src(choice):
|