Spaces:
Runtime error
Runtime error
Commit ·
c36829b
1
Parent(s): 2f90563
menu back
Browse files
app.py
CHANGED
|
@@ -189,10 +189,20 @@ def ui_full(launch_kwargs):
|
|
| 189 |
submit = gr.Button("Submit")
|
| 190 |
# Adapted from https://github.com/rkfg/audiocraft/blob/long/app.py, MIT license.
|
| 191 |
_ = gr.Button("Interrupt").click(fn=interrupt, queue=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
with gr.Column():
|
| 193 |
output = gr.Video(label="Generated Music")
|
| 194 |
submit.click(predict_full,
|
| 195 |
-
inputs=[
|
| 196 |
outputs=[output])
|
| 197 |
radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
|
| 198 |
gr.Examples(
|
|
@@ -202,7 +212,7 @@ def ui_full(launch_kwargs):
|
|
| 202 |
"A Bach inspired orchestral suite.",
|
| 203 |
"./assets/twinkle.mp3",
|
| 204 |
"melody"
|
| 205 |
-
]
|
| 206 |
],
|
| 207 |
inputs=[text, melody, model],
|
| 208 |
outputs=[output]
|
|
|
|
| 189 |
submit = gr.Button("Submit")
|
| 190 |
# Adapted from https://github.com/rkfg/audiocraft/blob/long/app.py, MIT license.
|
| 191 |
_ = gr.Button("Interrupt").click(fn=interrupt, queue=False)
|
| 192 |
+
with gr.Row():
|
| 193 |
+
model = gr.Radio(["melody", "medium", "small", "large"],
|
| 194 |
+
label="Model", value="melody", interactive=True)
|
| 195 |
+
with gr.Row():
|
| 196 |
+
duration = gr.Slider(minimum=1, maximum=120, value=10, label="Duration", interactive=True)
|
| 197 |
+
with gr.Row():
|
| 198 |
+
topk = gr.Number(label="Top-k", value=250, interactive=True)
|
| 199 |
+
topp = gr.Number(label="Top-p", value=0, interactive=True)
|
| 200 |
+
temperature = gr.Number(label="Temperature", value=1.0, interactive=True)
|
| 201 |
+
cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
|
| 202 |
with gr.Column():
|
| 203 |
output = gr.Video(label="Generated Music")
|
| 204 |
submit.click(predict_full,
|
| 205 |
+
inputs=[model, text, melody, duration, topk, topp, temperature, cfg_coef],
|
| 206 |
outputs=[output])
|
| 207 |
radio.change(toggle_audio_src, radio, [melody], queue=False, show_progress=False)
|
| 208 |
gr.Examples(
|
|
|
|
| 212 |
"A Bach inspired orchestral suite.",
|
| 213 |
"./assets/twinkle.mp3",
|
| 214 |
"melody"
|
| 215 |
+
],
|
| 216 |
],
|
| 217 |
inputs=[text, melody, model],
|
| 218 |
outputs=[output]
|