Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
9477214
1
Parent(s):
0a63f68
Update app.py
Browse files
app.py
CHANGED
@@ -49,44 +49,35 @@ input_text = gr.Textbox(lines=2, label="Prompt")
|
|
49 |
#output_format = gr.Radio(label = "Output format", info = "The file you can dowload", choices = "wav"], value = "wav")
|
50 |
output_audio = gr.Audio(label="Generated Audio", type="filepath")
|
51 |
denoising_steps = gr.Slider(minimum=10, maximum=100, value=25, step=5, label="Steps", interactive=True)
|
52 |
-
guidance_scale = gr.Slider(minimum=1, maximum=10, value=
|
53 |
duration_scale = gr.Slider(minimum=1, maximum=30, value=10, step=1, label="Duration", interactive=True)
|
54 |
|
55 |
-
|
56 |
-
gr_interface = gr.Interface(
|
57 |
fn=gradio_generate,
|
58 |
-
inputs=[
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
examples=[
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
["A cup is filled from a faucet"],
|
71 |
-
["An audience cheering and clapping"],
|
72 |
-
["Rolling thunder with lightning strikes"],
|
73 |
-
["A dog barking and a cat mewing and a racing car passes by"],
|
74 |
-
["Gentle water stream, birds chirping and sudden gun shot"],
|
75 |
-
["A man talking followed by a goat baaing then a metal gate sliding shut as ducks quack and wind blows into a microphone."],
|
76 |
-
["A dog barking"],
|
77 |
-
["A cat meowing"],
|
78 |
-
["Wooden table tapping sound while water pouring"],
|
79 |
-
["Applause from a crowd with distant clicking and a man speaking over a loudspeaker"],
|
80 |
-
["two gunshots followed by birds flying away while chirping"],
|
81 |
-
["Whistling with birds chirping"],
|
82 |
-
["A person snoring"],
|
83 |
-
["Motor vehicles are driving with loud engines and a person whistles"],
|
84 |
-
["People cheering in a stadium while thunder and lightning strikes"],
|
85 |
-
["A helicopter is in flight"],
|
86 |
-
["A dog barking and a man talking and a racing car passes by"],
|
87 |
],
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
-
|
92 |
-
gr_interface.queue(15).launch()
|
|
|
49 |
#output_format = gr.Radio(label = "Output format", info = "The file you can dowload", choices = "wav"], value = "wav")
|
50 |
output_audio = gr.Audio(label="Generated Audio", type="filepath")
|
51 |
denoising_steps = gr.Slider(minimum=10, maximum=100, value=25, step=5, label="Steps", interactive=True)
|
52 |
+
guidance_scale = gr.Slider(minimum=1, maximum=10, value=4.5, step=0.5, label="Guidance Scale", interactive=True)
|
53 |
duration_scale = gr.Slider(minimum=1, maximum=30, value=10, step=1, label="Duration", interactive=True)
|
54 |
|
55 |
+
interface = gr.Interface(
|
|
|
56 |
fn=gradio_generate,
|
57 |
+
inputs=[
|
58 |
+
gr.Textbox(label="Prompt", placeholder="Enter your text prompt here"),
|
59 |
+
gr.Slider(0, 30, value=10, label="Duration in Seconds"),
|
60 |
+
gr.Slider(10, 150, value=50, step=5, label="Number of Diffusion Steps"),
|
61 |
+
gr.Slider(1, 10, value=4.5, step=0.5, label="CFG Scale")
|
62 |
+
],
|
63 |
+
outputs=gr.Audio(type="filepath", label="Generated Audio"),
|
64 |
+
title="TangoFlux Generator",
|
65 |
+
description="Generate variable-length stereo audio at 44.1kHz from text prompts using TangoFlux.",
|
66 |
examples=[
|
67 |
+
[
|
68 |
+
"Create a serene soundscape of a quiet beach at sunset.", # Text prompt
|
69 |
+
|
70 |
+
15, # Duration in Seconds
|
71 |
+
100, # Number of Diffusion Steps
|
72 |
+
4.5, # CFG Scale
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
],
|
74 |
+
|
75 |
+
["Rock beat played in a treated studio, session drumming on an acoustic kit.",
|
76 |
+
30, # Duration in Seconds
|
77 |
+
100, # Number of Diffusion Steps
|
78 |
+
7, # CFG Scale
|
79 |
+
|
80 |
+
]
|
81 |
+
])
|
82 |
|
83 |
+
interface.launch()
|
|