Eddycrack864 commited on
Commit
5cd025d
β€’
1 Parent(s): 9e06c0e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -178,7 +178,7 @@ def mdxnet_separator(mdxnet_audio, mdxnet_model, mdxnet_output_format, mdxnet_se
178
 
179
  return stem1_file, stem2_file
180
 
181
- def vrarch_separator(vrarch_audio, vrarch_model, vrarch_output_format, vrarch_window_size, vrarch_agression, vrarch_tta, vrarch_high_end_process):
182
  files_list = []
183
  files_list.clear()
184
  directory = "./outputs"
@@ -188,9 +188,9 @@ def vrarch_separator(vrarch_audio, vrarch_model, vrarch_output_format, vrarch_wi
188
  write(f'{random_id}.wav', vrarch_audio[0], vrarch_audio[1])
189
  prompt = f"audio-separator {random_id}.wav --model_filename {vrarch_model} --output_dir=./outputs --output_format={vrarch_output_format} --normalization=0.9 --vr_window_size={vrarch_window_size} --vr_aggression={vrarch_agression}"
190
 
191
- if vrarch_tta:
192
  prompt += " --vr_enable_tta"
193
- if vrarch_high_end_process:
194
  prompt += " --vr_high_end_process"
195
 
196
  os.system(prompt)
@@ -436,7 +436,7 @@ with gr.Blocks(title="🎡 UVR5 UI 🎡") as app:
436
  interactive = True
437
  )
438
  with gr.Row():
439
- vrarch_button = gr.Button("Separate", variant = "primary")
440
  with gr.Row():
441
  vrarch_stem1 = gr.Audio(
442
  show_download_button = True,
@@ -521,4 +521,4 @@ with gr.Blocks(title="🎡 UVR5 UI 🎡") as app:
521
 
522
  demucs_button.click(vrarch_separator, [demucs_audio, demucs_model, demucs_output_format, demucs_shifts, demucs_overlap], [demucs_stem1, demucs_stem2, demucs_stem3, demucs_stem4])
523
 
524
- app.launch(share=True)
 
178
 
179
  return stem1_file, stem2_file
180
 
181
+ def vrarch_separator(vrarch_audio, vrarch_model, vrarch_output_format, vrarch_window_size, vrarch_agression, tta, high_end_process):
182
  files_list = []
183
  files_list.clear()
184
  directory = "./outputs"
 
188
  write(f'{random_id}.wav', vrarch_audio[0], vrarch_audio[1])
189
  prompt = f"audio-separator {random_id}.wav --model_filename {vrarch_model} --output_dir=./outputs --output_format={vrarch_output_format} --normalization=0.9 --vr_window_size={vrarch_window_size} --vr_aggression={vrarch_agression}"
190
 
191
+ if tta:
192
  prompt += " --vr_enable_tta"
193
+ if high_end_process:
194
  prompt += " --vr_high_end_process"
195
 
196
  os.system(prompt)
 
436
  interactive = True
437
  )
438
  with gr.Row():
439
+ vrarch_button = gr.Button("Separate!", variant = "primary")
440
  with gr.Row():
441
  vrarch_stem1 = gr.Audio(
442
  show_download_button = True,
 
521
 
522
  demucs_button.click(vrarch_separator, [demucs_audio, demucs_model, demucs_output_format, demucs_shifts, demucs_overlap], [demucs_stem1, demucs_stem2, demucs_stem3, demucs_stem4])
523
 
524
+ app.launch()