lauraibnz commited on
Commit
41b2f0f
1 Parent(s): 083778b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -19
app.py CHANGED
@@ -61,24 +61,6 @@ with gr.Blocks(title="🎹 MIDI-AudioLDM", theme=gr.themes.Base(text_size=gr.the
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]], inputs=[midi, prompt, neg_prompt, duration, seed, cond, inf, guess], fn=predict, outputs=audio, cache_examples=True)
65
 
66
- # demo = gr.Interface(
67
- # fn=predict, inputs=[
68
- # gr.File(label="midi file", file_types=[".mid"]),
69
- # "text",
70
- # gr.Textbox(label="negative prompt"),
71
- # gr.Slider(0, 30, value=5, step=5, label="duration (seconds)"),
72
- # gr.Number(value=42, label="seed"),
73
- # gr.Slider(0.0, 1.0, value=1.0, step=0.1, label="conditioning scale"),
74
- # gr.Slider(0, 50, value=20, step=0.1, label="inference steps"),
75
- # gr.Checkbox(label="guess mode")
76
- # ],
77
- # outputs="audio",
78
- # examples=[["S00.mid", "piano", "", 10, 25, 1.0, 20, False]],
79
- # cache_examples=True,
80
- # title="🎹 MIDI-AudioLDM",
81
- # description="MIDI-AudioLDM is a MIDI-conditioned text-to-audio model based on the project [AudioLDM](https://huggingface.co/spaces/haoheliu/audioldm-text-to-audio-generation). The model has been conditioned using the ControlNet architecture and has been developed within Hugging Face’s [🧨 Diffusers](https://huggingface.co/docs/diffusers/) framework. Once trained, MIDI-AudioLDM accepts a MIDI file and a text prompt as inputs and returns an audio file, which is an interpretation of the MIDI based on the given text description. This enables detailed control over different musical aspects such as notes, mood and timbre.",
82
- # theme=gr.themes.Base(text_size=gr.themes.sizes.text_md, font=[gr.themes.GoogleFont("Nunito Sans")])
83
- # )
84
  demo.launch()
 
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)
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  demo.launch()