Politrees commited on
Commit
e42de32
·
verified ·
1 Parent(s): b43d613

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -20,9 +20,10 @@ ROFORMER_MODELS = {
20
  'Mel-Roformer-Karaoke-Aufr33-Viperx.ckpt': 'mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt',
21
  'Mel-Roformer-Denoise-Aufr33': 'denoise_mel_band_roformer_aufr33_sdr_27.9959.ckpt',
22
  'Mel-Roformer-Denoise-Aufr33-Aggr': 'denoise_mel_band_roformer_aufr33_aggr_sdr_27.9768.ckpt',
23
- 'MB-Roformer-Inst-v1 by Kim': 'melband_roformer_inst_v1.ckpt',
24
- 'MB-Roformer-InstVoc-Duality-v1 by Unwa': 'melband_roformer_instvoc_duality_v1.ckpt',
25
- 'MB-Roformer-InstVoc-Duality-v2 by Unwa': 'melband_roformer_instvox_duality_v2.ckpt',
 
26
  }
27
  MDX23C_MODELS = [
28
  'MDX23C_D1581.ckpt',
@@ -109,7 +110,7 @@ def print_message(input_file, model_name):
109
  """Prints information about the audio separation process."""
110
  base_name = os.path.splitext(os.path.basename(input_file))[0]
111
  print("\n")
112
- print("🎵 PolUVR 🎵")
113
  print("Input audio:", base_name)
114
  print("Separation Model:", model_name)
115
  print("Audio Separation Process...")
@@ -323,15 +324,15 @@ with gr.Blocks(
323
  gr.HTML("<h1> 🎵 Audio-Separator 🎵 </h1>")
324
  with gr.Accordion("General settings", open=False):
325
  with gr.Group():
326
- model_file_dir = gr.Textbox(value="/tmp/audio-separator-models/", label="Directory to cache model files", info="The directory where model files are stored.", placeholder="/tmp/audio-separator-models/", interactive=False)
327
  with gr.Row():
328
- output_dir = gr.Textbox(value="output", label="File output directory", info="The directory where output files will be saved.", placeholder="output", interactive=False)
329
  output_format = gr.Dropdown(value="wav", choices=["wav", "flac", "mp3"], label="Output Format", info="The format of the output audio file.")
330
  with gr.Row():
331
  norm_threshold = gr.Slider(minimum=0.1, maximum=1, step=0.1, value=0.9, label="Normalization threshold", info="The threshold for audio normalization.")
332
  amp_threshold = gr.Slider(minimum=0.1, maximum=1, step=0.1, value=0.6, label="Amplification threshold", info="The threshold for audio amplification.")
333
  with gr.Row():
334
- batch_size = gr.Slider(minimum=1, maximum=16, step=1, value=1, label="Batch Size", info="Larger consumes more RAM but may process slightly faster.", interactive=False)
335
 
336
  with gr.Tab("Roformer"):
337
  with gr.Group():
@@ -520,4 +521,8 @@ with gr.Blocks(
520
  outputs=[demucs_stem1, demucs_stem2, demucs_stem3, demucs_stem4, demucs_stem5, demucs_stem6],
521
  )
522
 
523
- app.launch(share=True)
 
 
 
 
 
20
  'Mel-Roformer-Karaoke-Aufr33-Viperx.ckpt': 'mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt',
21
  'Mel-Roformer-Denoise-Aufr33': 'denoise_mel_band_roformer_aufr33_sdr_27.9959.ckpt',
22
  'Mel-Roformer-Denoise-Aufr33-Aggr': 'denoise_mel_band_roformer_aufr33_aggr_sdr_27.9768.ckpt',
23
+ 'MelBand Roformer Kim | Inst V1 by Unwa': 'melband_roformer_inst_v1.ckpt',
24
+ 'MelBand Roformer Kim | Inst V2 by Unwa': 'melband_roformer_inst_v2.ckpt',
25
+ 'MelBand Roformer Kim | InstVoc Duality V1 by Unwa': 'melband_roformer_instvoc_duality_v1.ckpt',
26
+ 'MelBand Roformer Kim | InstVoc Duality V2 by Unwa': 'melband_roformer_instvox_duality_v2.ckpt',
27
  }
28
  MDX23C_MODELS = [
29
  'MDX23C_D1581.ckpt',
 
110
  """Prints information about the audio separation process."""
111
  base_name = os.path.splitext(os.path.basename(input_file))[0]
112
  print("\n")
113
+ print("🎵 Audio-Separator 🎵")
114
  print("Input audio:", base_name)
115
  print("Separation Model:", model_name)
116
  print("Audio Separation Process...")
 
324
  gr.HTML("<h1> 🎵 Audio-Separator 🎵 </h1>")
325
  with gr.Accordion("General settings", open=False):
326
  with gr.Group():
327
+ model_file_dir = gr.Textbox(value="/tmp/audio-separator-models/", label="Directory to cache model files", info="The directory where model files are stored.", placeholder="/tmp/audio-separator-models/")
328
  with gr.Row():
329
+ output_dir = gr.Textbox(value="output", label="File output directory", info="The directory where output files will be saved.", placeholder="output")
330
  output_format = gr.Dropdown(value="wav", choices=["wav", "flac", "mp3"], label="Output Format", info="The format of the output audio file.")
331
  with gr.Row():
332
  norm_threshold = gr.Slider(minimum=0.1, maximum=1, step=0.1, value=0.9, label="Normalization threshold", info="The threshold for audio normalization.")
333
  amp_threshold = gr.Slider(minimum=0.1, maximum=1, step=0.1, value=0.6, label="Amplification threshold", info="The threshold for audio amplification.")
334
  with gr.Row():
335
+ batch_size = gr.Slider(minimum=1, maximum=16, step=1, value=1, label="Batch Size", info="Larger consumes more RAM but may process slightly faster.")
336
 
337
  with gr.Tab("Roformer"):
338
  with gr.Group():
 
521
  outputs=[demucs_stem1, demucs_stem2, demucs_stem3, demucs_stem4, demucs_stem5, demucs_stem6],
522
  )
523
 
524
+ def main():
525
+ app.launch(share=True)
526
+
527
+ if __name__ == "__main__":
528
+ main()