helloWorld199 commited on
Commit
f8a5aa5
1 Parent(s): 915f3b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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
- #file_path = os.path.join(root, file_name)
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
 
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