Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ with gr.Blocks(title="🎹 MIDI-AudioLDM", theme=gr.themes.Base(text_size=gr.the
|
|
38 |
with gr.Row():
|
39 |
with gr.Column():
|
40 |
midi = gr.File(label="midi file", file_types=[".mid"])
|
41 |
-
prompt = "
|
42 |
neg_prompt = gr.Textbox(label="negative prompt")
|
43 |
with gr.Accordion("Advanced Settings"):
|
44 |
duration = gr.Slider(0, 30, value=5, step=5, label="duration (seconds)")
|
@@ -47,10 +47,10 @@ with gr.Blocks(title="🎹 MIDI-AudioLDM", theme=gr.themes.Base(text_size=gr.the
|
|
47 |
inf = gr.Slider(0, 50, value=20, step=0.1, label="inference steps")
|
48 |
guess = gr.Checkbox(label="guess mode")
|
49 |
with gr.Column():
|
50 |
-
audio = "audio"
|
51 |
btn = gr.Button("Generate")
|
52 |
btn.click(predict, inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], outputs=[audio])
|
53 |
-
|
54 |
|
55 |
# demo = gr.Interface(
|
56 |
# fn=predict, inputs=[
|
|
|
38 |
with gr.Row():
|
39 |
with gr.Column():
|
40 |
midi = gr.File(label="midi file", file_types=[".mid"])
|
41 |
+
prompt = gr.Textbox(label="prompt")
|
42 |
neg_prompt = gr.Textbox(label="negative prompt")
|
43 |
with gr.Accordion("Advanced Settings"):
|
44 |
duration = gr.Slider(0, 30, value=5, step=5, label="duration (seconds)")
|
|
|
47 |
inf = gr.Slider(0, 50, value=20, step=0.1, label="inference steps")
|
48 |
guess = gr.Checkbox(label="guess mode")
|
49 |
with gr.Column():
|
50 |
+
audio = gr.Audio(label="audio")
|
51 |
btn = gr.Button("Generate")
|
52 |
btn.click(predict, inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], outputs=[audio])
|
53 |
+
gr.Examples=(examples=[["S00.mid", "piano", "", 10, 25, 1.0, 20, False]], input=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], cache_examples=True)
|
54 |
|
55 |
# demo = gr.Interface(
|
56 |
# fn=predict, inputs=[
|