Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,17 +48,17 @@ with gr.Blocks(title="🎹 MIDI-AudioLDM", theme=gr.themes.Base(text_size=gr.the
|
|
48 |
""")
|
49 |
with gr.Row():
|
50 |
with gr.Column(variant='panel'):
|
51 |
-
midi = gr.File(label="midi file", file_types=[".mid"])
|
52 |
-
prompt = gr.Textbox(label="prompt")
|
53 |
with gr.Column(variant='panel'):
|
54 |
audio = gr.Audio(label="audio")
|
55 |
with gr.Accordion("Advanced Settings", open=False):
|
56 |
-
neg_prompt = gr.Textbox(label="negative prompt")
|
57 |
duration = gr.Slider(0, 30, value=5, step=5, label="duration (seconds)")
|
58 |
-
seed = gr.Number(value=42, label="seed")
|
59 |
-
cond = gr.Slider(0.0, 1.0, value=1.0, step=0.1, label="conditioning scale")
|
60 |
-
inf = gr.Slider(0, 50, value=20, step=0.1, label="inference steps")
|
61 |
-
guess = gr.Checkbox(label="guess mode")
|
62 |
btn = gr.Button("Generate")
|
63 |
btn.click(predict, inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], outputs=[audio])
|
64 |
gr.Examples(examples=[["S00.mid", "piano", "", 10, 25, 1.0, 20, False], ["S00.mid", "violin", "", 10, 25, 1.0, 20, False], ["S00.mid", "woman singing", "", 10, 25, 0.8, 20, False]], inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], fn=predict, outputs=audio, cache_examples=True)
|
|
|
48 |
""")
|
49 |
with gr.Row():
|
50 |
with gr.Column(variant='panel'):
|
51 |
+
midi = gr.File(label="midi file", file_types=[".mid"], info="Load the MIDI file that you want to use as conditioning.")
|
52 |
+
prompt = gr.Textbox(label="prompt", info="Enter a descriptive text prompt.")
|
53 |
with gr.Column(variant='panel'):
|
54 |
audio = gr.Audio(label="audio")
|
55 |
with gr.Accordion("Advanced Settings", open=False):
|
56 |
+
neg_prompt = gr.Textbox(label="negative prompt", info="Optionally enter a negative text prompt.")
|
57 |
duration = gr.Slider(0, 30, value=5, step=5, label="duration (seconds)")
|
58 |
+
seed = gr.Number(value=42, label="seed", "Change the random seed for a different generation result.")
|
59 |
+
cond = gr.Slider(0.0, 1.0, value=1.0, step=0.1, label="conditioning scale", info="Enter a value between 0 and 1. The larger the more it will take the conditioning into account.")
|
60 |
+
inf = gr.Slider(0, 50, value=20, step=0.1, label="inference steps", info="Edit the number of denoising steps. More inference steps usually lead to better but slower results.")
|
61 |
+
guess = gr.Checkbox(label="guess mode", info="If true, the model will try to recognize the content of the conditioning without the need of a text prompt.")
|
62 |
btn = gr.Button("Generate")
|
63 |
btn.click(predict, inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], outputs=[audio])
|
64 |
gr.Examples(examples=[["S00.mid", "piano", "", 10, 25, 1.0, 20, False], ["S00.mid", "violin", "", 10, 25, 1.0, 20, False], ["S00.mid", "woman singing", "", 10, 25, 0.8, 20, False]], inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], fn=predict, outputs=audio, cache_examples=True)
|