Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -138,19 +138,17 @@ def ui_full(launch_kwargs):
|
|
138 |
with gr.Blocks() as interface:
|
139 |
gr.Markdown(
|
140 |
"""
|
141 |
-
|
142 |
-
This is your private demo for [MusicGen](https://github.com/facebookresearch/audiocraft), a simple and controllable model for music generation
|
143 |
-
presented at: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284)
|
144 |
"""
|
145 |
)
|
146 |
with gr.Row():
|
147 |
with gr.Column():
|
148 |
with gr.Row():
|
149 |
-
text = gr.Text(label="
|
150 |
melody = gr.Audio(source="upload", type="numpy", label="Melody Condition (optional)", interactive=True)
|
151 |
with gr.Row():
|
152 |
-
submit = gr.Button("
|
153 |
-
|
154 |
_ = gr.Button("Interrupt").click(fn=interrupt, queue=False)
|
155 |
with gr.Row():
|
156 |
model = gr.Radio(["melody", "medium", "small", "large"], label="Model", value="melody", interactive=True)
|
@@ -198,29 +196,7 @@ def ui_full(launch_kwargs):
|
|
198 |
)
|
199 |
gr.Markdown(
|
200 |
"""
|
201 |
-
|
202 |
-
|
203 |
-
The model will generate a short music extract based on the description you provided.
|
204 |
-
The model can generate up to 30 seconds of audio in one pass. It is now possible
|
205 |
-
to extend the generation by feeding back the end of the previous chunk of audio.
|
206 |
-
This can take a long time, and the model might lose consistency. The model might also
|
207 |
-
decide at arbitrary positions that the song ends.
|
208 |
-
|
209 |
-
**WARNING:** Choosing long durations will take a long time to generate (2min might take ~10min). An overlap of 12 seconds
|
210 |
-
is kept with the previously generated chunk, and 18 "new" seconds are generated each time.
|
211 |
-
|
212 |
-
We present 4 model variations:
|
213 |
-
1. Melody -- a music generation model capable of generating music condition on text and melody inputs. **Note**, you can also use text only.
|
214 |
-
2. Small -- a 300M transformer decoder conditioned on text only.
|
215 |
-
3. Medium -- a 1.5B transformer decoder conditioned on text only.
|
216 |
-
4. Large -- a 3.3B transformer decoder conditioned on text only (might OOM for the longest sequences.)
|
217 |
-
|
218 |
-
When using `melody`, ou can optionaly provide a reference audio from
|
219 |
-
which a broad melody will be extracted. The model will then try to follow both the description and melody provided.
|
220 |
-
|
221 |
-
You can also use your own GPU or a Google Colab by following the instructions on our repo.
|
222 |
-
See [github.com/facebookresearch/audiocraft](https://github.com/facebookresearch/audiocraft)
|
223 |
-
for more details.
|
224 |
"""
|
225 |
)
|
226 |
|
@@ -231,14 +207,7 @@ def ui_batched(launch_kwargs):
|
|
231 |
with gr.Blocks() as demo:
|
232 |
gr.Markdown(
|
233 |
"""
|
234 |
-
|
235 |
-
|
236 |
-
This is the demo for [MusicGen](https://github.com/facebookresearch/audiocraft), a simple and controllable model for music generation
|
237 |
-
presented at: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284).
|
238 |
-
<br/>
|
239 |
-
<a href="https://huggingface.co/spaces/facebook/MusicGen?duplicate=true" style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
240 |
-
<img style="margin-bottom: 0em;display: inline;margin-top: -.25em;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
241 |
-
for longer sequences, more control and no queue.</p>
|
242 |
"""
|
243 |
)
|
244 |
with gr.Row():
|
|
|
138 |
with gr.Blocks() as interface:
|
139 |
gr.Markdown(
|
140 |
"""
|
141 |
+
|
|
|
|
|
142 |
"""
|
143 |
)
|
144 |
with gr.Row():
|
145 |
with gr.Column():
|
146 |
with gr.Row():
|
147 |
+
text = gr.Text(label="Текст пример (bass drum cyberpunk)", interactive=True)
|
148 |
melody = gr.Audio(source="upload", type="numpy", label="Melody Condition (optional)", interactive=True)
|
149 |
with gr.Row():
|
150 |
+
submit = gr.Button("Создать")
|
151 |
+
|
152 |
_ = gr.Button("Interrupt").click(fn=interrupt, queue=False)
|
153 |
with gr.Row():
|
154 |
model = gr.Radio(["melody", "medium", "small", "large"], label="Model", value="melody", interactive=True)
|
|
|
196 |
)
|
197 |
gr.Markdown(
|
198 |
"""
|
199 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
"""
|
201 |
)
|
202 |
|
|
|
207 |
with gr.Blocks() as demo:
|
208 |
gr.Markdown(
|
209 |
"""
|
210 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
"""
|
212 |
)
|
213 |
with gr.Row():
|