Spaces:
Runtime error
Runtime error
Commit
·
0a63f68
1
Parent(s):
9d9c8ab
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,7 @@ def gradio_generate(prompt, steps, guidance,duration=10):
|
|
| 29 |
output_wave = tangoflux.generate(prompt,steps=steps,guidance_scale=guidance,duration=duration)
|
| 30 |
output_filename = "temp.wav"
|
| 31 |
torchaudio.save(output_filename, output_wave, sample_rate=44100)
|
|
|
|
| 32 |
#wavio.write(output_filename, output_wave, rate=44100, sampwidth=2)
|
| 33 |
|
| 34 |
#if (output_format == "mp3"):
|
|
@@ -55,8 +56,8 @@ duration_scale = gr.Slider(minimum=1, maximum=30, value=10, step=1, label="Durat
|
|
| 55 |
gr_interface = gr.Interface(
|
| 56 |
fn=gradio_generate,
|
| 57 |
inputs=[input_text, denoising_steps, guidance_scale,duration_scale],
|
| 58 |
-
outputs=
|
| 59 |
-
title="TangoFlux:
|
| 60 |
description=description_text,
|
| 61 |
allow_flagging=False,
|
| 62 |
examples=[
|
|
@@ -88,4 +89,4 @@ gr_interface = gr.Interface(
|
|
| 88 |
)
|
| 89 |
|
| 90 |
# Launch Gradio app
|
| 91 |
-
gr_interface.queue(
|
|
|
|
| 29 |
output_wave = tangoflux.generate(prompt,steps=steps,guidance_scale=guidance,duration=duration)
|
| 30 |
output_filename = "temp.wav"
|
| 31 |
torchaudio.save(output_filename, output_wave, sample_rate=44100)
|
| 32 |
+
|
| 33 |
#wavio.write(output_filename, output_wave, rate=44100, sampwidth=2)
|
| 34 |
|
| 35 |
#if (output_format == "mp3"):
|
|
|
|
| 56 |
gr_interface = gr.Interface(
|
| 57 |
fn=gradio_generate,
|
| 58 |
inputs=[input_text, denoising_steps, guidance_scale,duration_scale],
|
| 59 |
+
outputs=output_audio,
|
| 60 |
+
title="TangoFlux: ",
|
| 61 |
description=description_text,
|
| 62 |
allow_flagging=False,
|
| 63 |
examples=[
|
|
|
|
| 89 |
)
|
| 90 |
|
| 91 |
# Launch Gradio app
|
| 92 |
+
gr_interface.queue(15).launch()
|