Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -188,24 +188,22 @@ def inference(audio):
|
|
188 |
os.makedirs("out", exist_ok=True)
|
189 |
result = os.system(new_command)
|
190 |
print(f"Demucs script result: {result}")
|
191 |
-
|
192 |
|
193 |
files = [
|
194 |
-
"./out/mdx_extra_q/
|
195 |
-
"./out/mdx_extra_q/
|
196 |
-
"./out/mdx_extra_q/
|
197 |
-
"./out/mdx_extra_q/
|
198 |
]
|
199 |
|
200 |
-
|
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
|
209 |
|
210 |
|
211 |
def toggle_audio_src(choice):
|
|
|
188 |
os.makedirs("out", exist_ok=True)
|
189 |
result = os.system(new_command)
|
190 |
print(f"Demucs script result: {result}")
|
191 |
+
directory_name = os.path.splitext(os.path.basename(audio))[0]
|
192 |
|
193 |
files = [
|
194 |
+
f"./out/mdx_extra_q/{directory_name}/vocals.wav",
|
195 |
+
f"./out/mdx_extra_q/{directory_name}/bass.wav",
|
196 |
+
f"./out/mdx_extra_q/{directory_name}/drums.wav",
|
197 |
+
f"./out/mdx_extra_q/{directory_name}/other.wav"
|
198 |
]
|
199 |
|
200 |
+
for file in files:
|
|
|
|
|
201 |
if not os.path.isfile(file):
|
202 |
print(f"File not found: {file}")
|
203 |
else:
|
204 |
print(f"File exists: {file}")
|
205 |
|
206 |
+
return files
|
207 |
|
208 |
|
209 |
def toggle_audio_src(choice):
|