Update app.py
Browse files
app.py
CHANGED
@@ -79,18 +79,6 @@ def predict(music_prompt, melody, duration):
|
|
79 |
|
80 |
|
81 |
with gr.Blocks() as demo:
|
82 |
-
gr.Markdown(
|
83 |
-
"""
|
84 |
-
# Split to MusicGen
|
85 |
-
|
86 |
-
This is the demo by @fffiloni for Split to [MusicGen](https://github.com/facebookresearch/audiocraft), a simple and controllable model for music generation
|
87 |
-
presented at: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284), using Clip Interrogator to get an image description as init text.
|
88 |
-
<br/>
|
89 |
-
<a href="https://huggingface.co/spaces/musicgen/MusicGen?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
90 |
-
<img style="margin-bottom: 0em;display: inline;margin-top: -.25em;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
91 |
-
for longer sequences, more control and no queue.</p>
|
92 |
-
"""
|
93 |
-
)
|
94 |
with gr.Row():
|
95 |
with gr.Column():
|
96 |
with gr.Row():
|
@@ -120,26 +108,5 @@ with gr.Blocks() as demo:
|
|
120 |
load_sound_btn.click(split_process, inputs=[uploaded_sound, chosen_track], outputs=[melody])
|
121 |
submit.click(predict, inputs=[music_prompt, melody, duration], outputs=[output])
|
122 |
|
123 |
-
gr.Markdown(
|
124 |
-
"""
|
125 |
-
### More details
|
126 |
-
|
127 |
-
The model will generate a short music extract based on the audio you provided.
|
128 |
-
You can generate up to 30 seconds of audio.
|
129 |
-
|
130 |
-
This demo is set to use only the Melody model
|
131 |
-
1. Melody -- a music generation model capable of generating music condition on text and melody inputs. **Note**, you can also use text only.
|
132 |
-
2. Small -- a 300M transformer decoder conditioned on text only.
|
133 |
-
3. Medium -- a 1.5B transformer decoder conditioned on text only.
|
134 |
-
4. Large -- a 3.3B transformer decoder conditioned on text only (might OOM for the longest sequences.)
|
135 |
-
|
136 |
-
When using `melody`, ou can optionaly provide a reference audio from
|
137 |
-
which a broad melody will be extracted. The model will then try to follow both the description and melody provided.
|
138 |
-
|
139 |
-
You can also use your own GPU or a Google Colab by following the instructions on our repo.
|
140 |
-
See [github.com/facebookresearch/audiocraft](https://github.com/facebookresearch/audiocraft)
|
141 |
-
for more details.
|
142 |
-
"""
|
143 |
-
)
|
144 |
|
145 |
demo.queue(max_size=32).launch()
|
|
|
79 |
|
80 |
|
81 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
with gr.Row():
|
83 |
with gr.Column():
|
84 |
with gr.Row():
|
|
|
108 |
load_sound_btn.click(split_process, inputs=[uploaded_sound, chosen_track], outputs=[melody])
|
109 |
submit.click(predict, inputs=[music_prompt, melody, duration], outputs=[output])
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
demo.queue(max_size=32).launch()
|