Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,18 +83,18 @@ def analyze(path):
|
|
83 |
file_name_without_extension = os.path.splitext(file_name)[0]
|
84 |
|
85 |
bass_path, drums_path, other_path, vocals_path = None, None, None, None
|
86 |
-
for root, dirs, files in os.walk("./demix"):
|
87 |
for file_path in files:
|
88 |
-
|
89 |
print(file_path)
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
#return result.bpm, fig, sonif_path, elapsed_time
|
100 |
return result.bpm, elapsed_time, bass_path, drums_path, other_path, vocals_path
|
|
|
83 |
file_name_without_extension = os.path.splitext(file_name)[0]
|
84 |
|
85 |
bass_path, drums_path, other_path, vocals_path = None, None, None, None
|
86 |
+
for root, dirs, files in os.walk(f"./demix/demucs/{file_name_without_extension}"):
|
87 |
for file_path in files:
|
88 |
+
file_path = os.path.join(root, file_path)
|
89 |
print(file_path)
|
90 |
+
if "bass.wav" in file_path:
|
91 |
+
bass_path = file_path
|
92 |
+
if "vocals.wav" in file_path:
|
93 |
+
vocals_path = file_path
|
94 |
+
if "other.wav" in file_path:
|
95 |
+
other_path = file_path
|
96 |
+
if "drums.wav" in file_path:
|
97 |
+
drums_path = file_path
|
98 |
|
99 |
#return result.bpm, fig, sonif_path, elapsed_time
|
100 |
return result.bpm, elapsed_time, bass_path, drums_path, other_path, vocals_path
|