kevinwang676 commited on
Commit
ae06180
·
verified ·
1 Parent(s): 67a3a29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -221,6 +221,10 @@ pre_fun_hp5 = func(
221
  # GPU needed
222
  @spaces.GPU(duration=120)
223
  def get_vocal_gpu(audio_path, split_model, filename):
 
 
 
 
224
  return pre_fun._path_audio_(audio_path, f"./output/{split_model}/{filename}/", f"./output/{split_model}/{filename}/", "wav")
225
 
226
  def youtube_downloader(
@@ -239,10 +243,6 @@ def youtube_downloader(
239
  # make dir output
240
  os.makedirs("output", exist_ok=True)
241
 
242
- if split_model=="UVR-HP2":
243
- pre_fun = pre_fun_hp2
244
- else:
245
- pre_fun = pre_fun_hp5
246
  get_vocal_gpu(audio_path, split_model, filename)
247
  #pre_fun._path_audio_(audio_path, f"./output/{split_model}/{filename}/", f"./output/{split_model}/{filename}/", "wav")
248
  os.remove(filename.strip()+".wav")
 
221
  # GPU needed
222
  @spaces.GPU(duration=120)
223
  def get_vocal_gpu(audio_path, split_model, filename):
224
+ if split_model=="UVR-HP2":
225
+ pre_fun = pre_fun_hp2
226
+ else:
227
+ pre_fun = pre_fun_hp5
228
  return pre_fun._path_audio_(audio_path, f"./output/{split_model}/{filename}/", f"./output/{split_model}/{filename}/", "wav")
229
 
230
  def youtube_downloader(
 
243
  # make dir output
244
  os.makedirs("output", exist_ok=True)
245
 
 
 
 
 
246
  get_vocal_gpu(audio_path, split_model, filename)
247
  #pre_fun._path_audio_(audio_path, f"./output/{split_model}/{filename}/", f"./output/{split_model}/{filename}/", "wav")
248
  os.remove(filename.strip()+".wav")