Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
More explicit text
Browse files- demos/musicgen_app.py +6 -6
demos/musicgen_app.py
CHANGED
@@ -245,7 +245,7 @@ def ui_full(launch_kwargs):
|
|
245 |
gr.Markdown(
|
246 |
"""
|
247 |
# Text-to-Music / Music-to-Music
|
248 |
-
|
249 |
presented at: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284).
|
250 |
Modified for experiments in the re-scoring of *Metropolis* and *Wings*.
|
251 |
"""
|
@@ -256,11 +256,11 @@ def ui_full(launch_kwargs):
|
|
256 |
text = gr.Text(label="Input Text", interactive=True)
|
257 |
with gr.Column():
|
258 |
radio = gr.Radio(["file", "mic"], value="file",
|
259 |
-
label="Condition on a melody (optional) File or
|
260 |
melody = gr.Audio(source="upload", type="numpy", label="File",
|
261 |
interactive=True, elem_id="melody-input")
|
262 |
with gr.Row():
|
263 |
-
submit = gr.Button(variant = "primary")
|
264 |
# Adapted from https://github.com/rkfg/audiocraft/blob/long/app.py, MIT license.
|
265 |
_ = gr.Button("Abort all", variant="stop").click(fn=interrupt, queue = False)
|
266 |
with gr.Row():
|
@@ -269,7 +269,7 @@ def ui_full(launch_kwargs):
|
|
269 |
topk = gr.Number(label="Top-k", info = "Number of tokens shortlisted", value = 250, interactive = True)
|
270 |
topp = gr.Number(label="Top-p", info = "Percent of tokens shortlisted", value = 0, interactive = True)
|
271 |
temperature = gr.Number(label="Temperature", info = "lower=Always similar, higher=More creative", value = 1.0, interactive = True)
|
272 |
-
cfg_coef = gr.Number(label="Classifier
|
273 |
with gr.Row():
|
274 |
decoder = gr.Radio(["Default", "MultiBand_Diffusion"],
|
275 |
label="Decoder", value="Default", interactive=True)
|
@@ -365,7 +365,7 @@ def ui_batched(launch_kwargs):
|
|
365 |
"""
|
366 |
# MusicGen
|
367 |
|
368 |
-
For
|
369 |
<br/>
|
370 |
<a href="https://huggingface.co/spaces/facebook/MusicGen?duplicate=true"
|
371 |
style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
@@ -380,7 +380,7 @@ def ui_batched(launch_kwargs):
|
|
380 |
text = gr.Text(label="Describe your music", lines=2, interactive=True)
|
381 |
with gr.Column():
|
382 |
radio = gr.Radio(["file", "mic"], value="file",
|
383 |
-
label="Condition on a melody (optional) File or
|
384 |
melody = gr.Audio(source="upload", type="numpy", label="File",
|
385 |
interactive=True, elem_id="melody-input")
|
386 |
with gr.Row():
|
|
|
245 |
gr.Markdown(
|
246 |
"""
|
247 |
# Text-to-Music / Music-to-Music
|
248 |
+
Derived from [MusicGen](https://github.com/facebookresearch/audiocraft),
|
249 |
presented at: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284).
|
250 |
Modified for experiments in the re-scoring of *Metropolis* and *Wings*.
|
251 |
"""
|
|
|
256 |
text = gr.Text(label="Input Text", interactive=True)
|
257 |
with gr.Column():
|
258 |
radio = gr.Radio(["file", "mic"], value="file",
|
259 |
+
label="Condition on a melody (optional) File or Microphone")
|
260 |
melody = gr.Audio(source="upload", type="numpy", label="File",
|
261 |
interactive=True, elem_id="melody-input")
|
262 |
with gr.Row():
|
263 |
+
submit = gr.Button("Generate", variant = "primary")
|
264 |
# Adapted from https://github.com/rkfg/audiocraft/blob/long/app.py, MIT license.
|
265 |
_ = gr.Button("Abort all", variant="stop").click(fn=interrupt, queue = False)
|
266 |
with gr.Row():
|
|
|
269 |
topk = gr.Number(label="Top-k", info = "Number of tokens shortlisted", value = 250, interactive = True)
|
270 |
topp = gr.Number(label="Top-p", info = "Percent of tokens shortlisted", value = 0, interactive = True)
|
271 |
temperature = gr.Number(label="Temperature", info = "lower=Always similar, higher=More creative", value = 1.0, interactive = True)
|
272 |
+
cfg_coef = gr.Number(label="Classifier-Free Guidance", info = "lower=Audio quality, higher=Follow the prompt", value = 3.0, interactive=True)
|
273 |
with gr.Row():
|
274 |
decoder = gr.Radio(["Default", "MultiBand_Diffusion"],
|
275 |
label="Decoder", value="Default", interactive=True)
|
|
|
365 |
"""
|
366 |
# MusicGen
|
367 |
|
368 |
+
For Metropolis - from: ["Simple and Controllable Music Generation"](https://huggingface.co/papers/2306.05284).
|
369 |
<br/>
|
370 |
<a href="https://huggingface.co/spaces/facebook/MusicGen?duplicate=true"
|
371 |
style="display: inline-block;margin-top: .5em;margin-right: .25em;" target="_blank">
|
|
|
380 |
text = gr.Text(label="Describe your music", lines=2, interactive=True)
|
381 |
with gr.Column():
|
382 |
radio = gr.Radio(["file", "mic"], value="file",
|
383 |
+
label="Condition on a melody (optional) File or Microphone")
|
384 |
melody = gr.Audio(source="upload", type="numpy", label="File",
|
385 |
interactive=True, elem_id="melody-input")
|
386 |
with gr.Row():
|