Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ with gr.Blocks(css=css) as demo:
|
|
88 |
with gr.Column(elem_id="col-container"):
|
89 |
gr.Markdown(
|
90 |
"""
|
91 |
-
# Split Audio to MusicGen
|
92 |
Upload an audio file, split audio tracks with Demucs, choose a track as conditional sound for MusicGen, get a remix !
|
93 |
<br/>
|
94 |
<a href="https://huggingface.co/spaces/fffiloni/SplitTrack2MusicGen?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
@@ -96,32 +96,32 @@ with gr.Blocks(css=css) as demo:
|
|
96 |
for longer sequences, more control and no queue.</p>
|
97 |
"""
|
98 |
)
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
load_sound_btn.click(split_process, inputs=[uploaded_sound, chosen_track], outputs=[melody])
|
126 |
submit.click(predict, inputs=[music_prompt, melody, duration, model], outputs=[output])
|
127 |
|
|
|
88 |
with gr.Column(elem_id="col-container"):
|
89 |
gr.Markdown(
|
90 |
"""
|
91 |
+
# Split Audio Tracks to MusicGen
|
92 |
Upload an audio file, split audio tracks with Demucs, choose a track as conditional sound for MusicGen, get a remix !
|
93 |
<br/>
|
94 |
<a href="https://huggingface.co/spaces/fffiloni/SplitTrack2MusicGen?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
|
|
96 |
for longer sequences, more control and no queue.</p>
|
97 |
"""
|
98 |
)
|
99 |
+
|
100 |
+
with gr.Column():
|
101 |
+
uploaded_sound = gr.Audio(type="numpy", label="Input", source="upload")
|
102 |
+
chosen_track = gr.Radio(["vocals", "bass", "drums", "other", "all-in"], label="Track", info="Which track from your audio do you want to mashup ?", value="vocals")
|
103 |
+
load_sound_btn = gr.Button('Load your sound')
|
104 |
+
#split_vocals = gr.Audio(type="filepath", label="Vocals")
|
105 |
+
#split_bass = gr.Audio(type="filepath", label="Bass")
|
106 |
+
#split_drums = gr.Audio(type="filepath", label="Drums")
|
107 |
+
#split_others = gr.Audio(type="filepath", label="Other")
|
108 |
+
|
109 |
+
with gr.Row():
|
110 |
+
music_prompt = gr.Textbox(label="Musical Prompt", info="Describe what kind of music you wish for", interactive=True)
|
111 |
+
melody = gr.Audio(source="upload", type="numpy", label="Track Condition (from previous step)", interactive=False)
|
112 |
+
with gr.Row():
|
113 |
+
model = gr.Radio(["melody", "medium", "small", "large"], label="MusicGen Model", value="melody", interactive=True)
|
114 |
+
with gr.Row():
|
115 |
+
duration = gr.Slider(minimum=1, maximum=30, value=10, step=1, label="Generated Music Duration", interactive=True)
|
116 |
+
with gr.Row():
|
117 |
+
submit = gr.Button("Submit")
|
118 |
+
#with gr.Row():
|
119 |
+
# topk = gr.Number(label="Top-k", value=250, interactive=True)
|
120 |
+
# topp = gr.Number(label="Top-p", value=0, interactive=True)
|
121 |
+
# temperature = gr.Number(label="Temperature", value=1.0, interactive=True)
|
122 |
+
# cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
|
123 |
+
|
124 |
+
output = gr.Audio(label="Generated Music")
|
125 |
load_sound_btn.click(split_process, inputs=[uploaded_sound, chosen_track], outputs=[melody])
|
126 |
submit.click(predict, inputs=[music_prompt, melody, duration, model], outputs=[output])
|
127 |
|