Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -24,23 +24,22 @@ def infer(prompt, steps):
|
|
24 |
return read(wav_bytes)
|
25 |
|
26 |
with gr.Blocks() as app:
|
27 |
-
|
28 |
-
gr.
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
|
34 |
-
|
|
|
35 |
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
|
|
41 |
|
42 |
-
|
43 |
-
examples=[["rap battle freestyle"], ["techno club banger"], ["acoustic folk ballad"], ["blues guitar riff"], ["jazzy trumpet solo"], ["classical symphony orchestra"], ["rock and roll power chord"], ["soulful R&B love song"], ["reggae dub beat"], ["country western twangy guitar"], ["all 25 steps"]],
|
44 |
-
inputs=[prompt])
|
45 |
-
|
46 |
-
app.launch()
|
|
|
24 |
return read(wav_bytes)
|
25 |
|
26 |
with gr.Blocks() as app:
|
27 |
+
with gr.Row():
|
28 |
+
with gr.Column():
|
29 |
+
prompt = gr.Textbox(lines=1, label="Prompt")
|
30 |
+
steps = gr.Slider(minimum=1, maximum=100, value=25, label="Steps")
|
31 |
+
btn_generate = gr.Button(value="Generate")
|
32 |
+
with gr.Column():
|
33 |
+
audio = gr.Audio(label="Audio")
|
34 |
|
35 |
+
inputs = [prompt, steps]
|
36 |
+
outputs = [audio]
|
37 |
|
38 |
+
prompt.submit(infer, inputs, outputs)
|
39 |
+
btn_generate.click(infer, inputs, outputs)
|
40 |
|
41 |
+
examples = gr.Examples(
|
42 |
+
examples=[["rap battle freestyle"], ["techno club banger"], ["acoustic folk ballad"], ["blues guitar riff"], ["jazzy trumpet solo"], ["classical symphony orchestra"], ["rock and roll power chord"], ["soulful R&B love song"], ["reggae dub beat"], ["country western twangy guitar"], ["all 25 steps"]],
|
43 |
+
inputs=[prompt])
|
44 |
|
45 |
+
app.launch(debug=True, share=True)
|
|
|
|
|
|
|
|