Spaces:
Runtime error
Runtime error
mrolando commited on
Commit 路
6cee433
1
Parent(s): f651720
fixed space
Browse files
app.py
CHANGED
|
@@ -46,7 +46,9 @@ def translate_text(text):
|
|
| 46 |
return result[0]['translation_text']
|
| 47 |
|
| 48 |
|
| 49 |
-
def generate_sound(text,
|
|
|
|
|
|
|
| 50 |
print(text)
|
| 51 |
text = translate_text(text)
|
| 52 |
negative_prompt = translate_text(negative_prompt)
|
|
@@ -82,18 +84,18 @@ with gr.Blocks(title="Uso de AI para la generaci贸n de sonidos a partir de texto
|
|
| 82 |
with gr.Row():
|
| 83 |
with gr.Accordion("Opciones avanzadas", open=False): #Let's hide the advanced options!
|
| 84 |
negative_prompt = gr.Textbox(label="Texto negativo para la generaci贸n", info='Al ingresar texto en este campo el modelo intentar谩 alejarse lo mas posible del mismo, este puede ser "baja calidad"')
|
| 85 |
-
with gr.Row():
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
with gr.Row():
|
| 92 |
examples = gr.Examples(inputs=[prompt,negative_prompt],examples=[["Un martillo golpeando madera","low quality"]])
|
| 93 |
|
| 94 |
with gr.Column():
|
| 95 |
output = gr.Audio(label="Resultado") #Move the output up too
|
| 96 |
|
| 97 |
-
btn.click(fn=generate_sound, inputs=[prompt,
|
| 98 |
|
| 99 |
demo.launch()
|
|
|
|
| 46 |
return result[0]['translation_text']
|
| 47 |
|
| 48 |
|
| 49 |
+
def generate_sound(text,negative_prompt):
|
| 50 |
+
steps = 17
|
| 51 |
+
audio_length=5
|
| 52 |
print(text)
|
| 53 |
text = translate_text(text)
|
| 54 |
negative_prompt = translate_text(negative_prompt)
|
|
|
|
| 84 |
with gr.Row():
|
| 85 |
with gr.Accordion("Opciones avanzadas", open=False): #Let's hide the advanced options!
|
| 86 |
negative_prompt = gr.Textbox(label="Texto negativo para la generaci贸n", info='Al ingresar texto en este campo el modelo intentar谩 alejarse lo mas posible del mismo, este puede ser "baja calidad"')
|
| 87 |
+
# with gr.Row():
|
| 88 |
+
# with gr.Column():
|
| 89 |
+
# audio_len = gr.Slider(label="Duraci贸n del sonido", minimum=1, maximum=30, value=5, step = 1,
|
| 90 |
+
# info="Cu谩nto mayor sonido, mayor ser谩 el tiempo de procesamiento.")
|
| 91 |
+
# steps = gr.Slider(label="Paos de Inferencia", minimum=1, maximum=100, value=15,step =1 ,
|
| 92 |
+
# info="Al aumentar los pasos de inferencia se puede acercar m谩s a la descripci贸n del texto pero con un mayor tiempo de procesamiento.")
|
| 93 |
with gr.Row():
|
| 94 |
examples = gr.Examples(inputs=[prompt,negative_prompt],examples=[["Un martillo golpeando madera","low quality"]])
|
| 95 |
|
| 96 |
with gr.Column():
|
| 97 |
output = gr.Audio(label="Resultado") #Move the output up too
|
| 98 |
|
| 99 |
+
btn.click(fn=generate_sound, inputs=[prompt,negative_prompt], outputs=[output]) #steps,guidance,width,height]
|
| 100 |
|
| 101 |
demo.launch()
|