Jaman commited on
Commit
2418321
·
verified ·
1 Parent(s): 9a2412f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,7 +39,7 @@ def process_audio(file_path, choice):
39
  os.chdir(home_directory)
40
  return [
41
  os.path.join('vocal_remover', file_name_without_ext, 'vocals.wav'),
42
- os.path.join('vocal_remover', file_name_without_ext, 'other.wav'),
43
  os.path.join('basic_splits', file_name_without_ext, 'bass.wav'),
44
  os.path.join('basic_splits', file_name_without_ext, 'drums.wav')
45
  ]
@@ -76,7 +76,7 @@ if uploaded_file is not None:
76
  file_name = os.path.basename(file)
77
  if 'vocals.wav' in file:
78
  st.write('Vocal')
79
- elif 'other.wav' in file:
80
  st.write('Music')
81
  elif 'bass.wav' in file:
82
  st.write('Bass')
@@ -89,5 +89,5 @@ if uploaded_file is not None:
89
 
90
  st.audio(file)
91
  with open(file, 'rb') as f:
92
- new_file_name = 'music.wav' if file_name == 'other.wav' else ('strings_or_pads.wav' if file_name == 'accompanion.wav' else file_name)
93
  st.download_button(label=f'Download {new_file_name}', data=f, file_name=new_file_name)
 
39
  os.chdir(home_directory)
40
  return [
41
  os.path.join('vocal_remover', file_name_without_ext, 'vocals.wav'),
42
+ os.path.join('basic_splits', file_name_without_ext, 'other.wav'),
43
  os.path.join('basic_splits', file_name_without_ext, 'bass.wav'),
44
  os.path.join('basic_splits', file_name_without_ext, 'drums.wav')
45
  ]
 
76
  file_name = os.path.basename(file)
77
  if 'vocals.wav' in file:
78
  st.write('Vocal')
79
+ elif 'accompaniment.wav' in file:
80
  st.write('Music')
81
  elif 'bass.wav' in file:
82
  st.write('Bass')
 
89
 
90
  st.audio(file)
91
  with open(file, 'rb') as f:
92
+ new_file_name = 'music.wav' if file_name == 'other.wav' else ('strings_or_pads.wav' if file_name == 'accompaniment.wav' else file_name)
93
  st.download_button(label=f'Download {new_file_name}', data=f, file_name=new_file_name)