nevreal commited on
Commit
b02866c
·
verified ·
1 Parent(s): d825cbd

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -0
app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import gradio as gr
3
+ import yt_dlp
4
+ from audio_separator.separator import Separator
5
+
6
+
7
+
8
+ # Define the Gradio Interface
9
+ with gr.Blocks(theme="NoCrypt/miku@1.2.2") as demo:
10
+ gr.Markdown("# Audio Separator Gradio demo")
11
+
12
+ with gr.Row():
13
+ with gr.Column():
14
+ link_input = gr.Textbox(label="Enter Audio/Video Link")
15
+ separate_button = gr.Button("Download and Separate Audio")
16
+
17
+ with gr.Column():
18
+ with gr.Accordion("Instrumental and Vocal output"):
19
+ instrumental_output = gr.Audio(label="Instrumental Output")
20
+ vocals_output = gr.Audio(label="Vocals Output")
21
+ with gr.Accordion("Reverb output"):
22
+ vocals_no_reverb_output = gr.Audio(label="Vocals No Reverb Output")
23
+ vocals_reverb_output = gr.Audio(label="Vocals Reverb Output")
24
+ lead_vocals_output = gr.Audio(label="Lead Vocals Output")
25
+ backing_vocals_output = gr.Audio(label="Backing Vocals Output")
26
+
27
+ # Define button functionality
28
+ # separate_button.click(
29
+ # separate_audio_from_link,
30
+ # inputs=[link_input],
31
+ # outputs=[
32
+ # instrumental_output,
33
+ # vocals_output,
34
+ # vocals_no_reverb_output,
35
+ # vocals_reverb_output,
36
+ # lead_vocals_output,
37
+ # backing_vocals_output
38
+ # ]
39
+ # )
40
+
41
+ # Launch the Gradio app
42
+ demo.launch(debug=True)