Blane187 commited on
Commit
7de4f1f
·
verified ·
1 Parent(s): 4df38d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -2,12 +2,13 @@ import gradio as gr
2
  import os
3
  from audio_separator.separator import Separator
4
 
 
 
 
5
  def separate_audio(input_file, output_dir, model_name):
6
  # Create output directory if it doesn't exist
7
  os.makedirs(output_dir, exist_ok=True)
8
 
9
- # Initialize the Separator
10
- separator = Separator()
11
 
12
  # Separate the audio
13
  separator.separate_audio_file(
@@ -41,7 +42,7 @@ def process_audio(audio_file, model_name):
41
  iface = gr.Blocks()
42
 
43
  with iface:
44
- gr.Markdown("# Audio Separator")
45
  with gr.Row():
46
  with gr.Column():
47
  audio_input = gr.Audio(type="filepath", label="Input Audio")
@@ -52,8 +53,9 @@ with iface:
52
  )
53
  submit_btn = gr.Button("Separate Audio")
54
  with gr.Column():
55
- vocal_output = gr.Audio(label="Main Vocal")
56
- backing_vocal_output = gr.Audio(label="Backing Vocal")
 
57
  instrumental_output = gr.Audio(label="Instrumental")
58
 
59
  submit_btn.click(
 
2
  import os
3
  from audio_separator.separator import Separator
4
 
5
+ # Initialize the Separator
6
+ separator = Separator()
7
+
8
  def separate_audio(input_file, output_dir, model_name):
9
  # Create output directory if it doesn't exist
10
  os.makedirs(output_dir, exist_ok=True)
11
 
 
 
12
 
13
  # Separate the audio
14
  separator.separate_audio_file(
 
42
  iface = gr.Blocks()
43
 
44
  with iface:
45
+ gr.Markdown("# Hex Separator")
46
  with gr.Row():
47
  with gr.Column():
48
  audio_input = gr.Audio(type="filepath", label="Input Audio")
 
53
  )
54
  submit_btn = gr.Button("Separate Audio")
55
  with gr.Column():
56
+ with gr.Row():
57
+ vocal_output = gr.Audio(label="Main Vocal")
58
+ backing_vocal_output = gr.Audio(label="Backing Vocal")
59
  instrumental_output = gr.Audio(label="Instrumental")
60
 
61
  submit_btn.click(