Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,11 +103,11 @@ with gr.Blocks(css=css) as demo:
|
|
103 |
duration = gr.Slider(0, 47, value=30, label="Duration in Seconds"),
|
104 |
steps = gr.Slider(10, 150, value=100, step=10, label="Number of Diffusion Steps"),
|
105 |
cfg = gr.Slider(1, 15, value=7, step=0.1, label="CFG Scale"),
|
106 |
-
|
107 |
-
|
108 |
with gr.Column():
|
109 |
output = gr.Image(label="audio")
|
110 |
-
|
111 |
|
112 |
# Pre-load the model to avoid multiprocessing issues
|
113 |
model, model_config = load_model()
|
|
|
103 |
duration = gr.Slider(0, 47, value=30, label="Duration in Seconds"),
|
104 |
steps = gr.Slider(10, 150, value=100, step=10, label="Number of Diffusion Steps"),
|
105 |
cfg = gr.Slider(1, 15, value=7, step=0.1, label="CFG Scale"),
|
106 |
+
btn = gr.Button(value="generate")
|
107 |
+
|
108 |
with gr.Column():
|
109 |
output = gr.Image(label="audio")
|
110 |
+
btn.click(generate_audio,input=[prompt,duration, steps, cfg],output=output,api_name="genAudio")
|
111 |
|
112 |
# Pre-load the model to avoid multiprocessing issues
|
113 |
model, model_config = load_model()
|