Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,10 +76,9 @@ button {
|
|
76 |
background-color: #f5f5f5; /* Fondo gris claro */
|
77 |
color: #333333; /* Texto gris oscuro */
|
78 |
border: 1px solid black; /* Borde negro en botones */
|
79 |
-
width:
|
80 |
box-sizing: border-box; /* Incluir el borde en el ancho total */
|
81 |
padding: 10px; /* Espacio interno en el bot贸n */
|
82 |
-
margin-right: 10px; /* Espacio entre los botones */
|
83 |
}
|
84 |
|
85 |
button.primary {
|
@@ -104,19 +103,19 @@ h1, h2, h3, h4, h5, h6 {
|
|
104 |
.button-container {
|
105 |
display: flex;
|
106 |
flex-direction: column;
|
107 |
-
align-items: center; /* Centra
|
108 |
}
|
109 |
|
110 |
.button-container button {
|
111 |
width: auto; /* Ajusta el ancho del bot贸n para m贸viles */
|
112 |
-
margin-top: 10px; /* Espacio superior para
|
113 |
}
|
114 |
}
|
115 |
|
116 |
@media (min-width: 769px) {
|
117 |
.button-container {
|
118 |
display: flex;
|
119 |
-
justify-content: flex-end; /* Alinea
|
120 |
}
|
121 |
|
122 |
.button-container button {
|
@@ -141,12 +140,7 @@ with gr.Blocks(css=css) as app:
|
|
141 |
|
142 |
with gr.Row():
|
143 |
with gr.Column(scale=1):
|
144 |
-
text_prompt = gr.Textbox(
|
145 |
-
label="驴Cu谩l fue tu sue帽o?",
|
146 |
-
placeholder="Describe lo que so帽aste, no omitas ning煤n detalle.",
|
147 |
-
lines=2,
|
148 |
-
elem_id="prompt-text-input"
|
149 |
-
)
|
150 |
|
151 |
with gr.Accordion("Opciones Avanzadas", open=False):
|
152 |
negative_prompt = gr.Textbox(
|
@@ -188,12 +182,10 @@ with gr.Blocks(css=css) as app:
|
|
188 |
|
189 |
with gr.Row(elem_id="button-container"):
|
190 |
generate_button = gr.Button("QUIERO VER MI SUE脩O", elem_id="generate-button", variant="primary")
|
191 |
-
clear_button = gr.Button("Clear", elem_id="clear-button", variant="secondary")
|
192 |
|
193 |
with gr.Column(scale=1):
|
194 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
195 |
|
196 |
generate_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, strength], outputs=image_output)
|
197 |
-
clear_button.click(lambda: text_prompt.update(value=""), outputs=text_prompt)
|
198 |
|
199 |
app.launch(show_api=False, share=False)
|
|
|
76 |
background-color: #f5f5f5; /* Fondo gris claro */
|
77 |
color: #333333; /* Texto gris oscuro */
|
78 |
border: 1px solid black; /* Borde negro en botones */
|
79 |
+
width: 100%; /* Ancho completo del bot贸n */
|
80 |
box-sizing: border-box; /* Incluir el borde en el ancho total */
|
81 |
padding: 10px; /* Espacio interno en el bot贸n */
|
|
|
82 |
}
|
83 |
|
84 |
button.primary {
|
|
|
103 |
.button-container {
|
104 |
display: flex;
|
105 |
flex-direction: column;
|
106 |
+
align-items: center; /* Centra el bot贸n en vista m贸vil */
|
107 |
}
|
108 |
|
109 |
.button-container button {
|
110 |
width: auto; /* Ajusta el ancho del bot贸n para m贸viles */
|
111 |
+
margin-top: 10px; /* Espacio superior para el bot贸n en m贸viles */
|
112 |
}
|
113 |
}
|
114 |
|
115 |
@media (min-width: 769px) {
|
116 |
.button-container {
|
117 |
display: flex;
|
118 |
+
justify-content: flex-end; /* Alinea el bot贸n a la derecha en vista de escritorio */
|
119 |
}
|
120 |
|
121 |
.button-container button {
|
|
|
140 |
|
141 |
with gr.Row():
|
142 |
with gr.Column(scale=1):
|
143 |
+
text_prompt = gr.Textbox(label="驴Cu谩l fue tu sue帽o?", placeholder="Describe lo que so帽aste, no omitas ning煤n detalle.", lines=2, elem_id="prompt-text-input")
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
with gr.Accordion("Opciones Avanzadas", open=False):
|
146 |
negative_prompt = gr.Textbox(
|
|
|
182 |
|
183 |
with gr.Row(elem_id="button-container"):
|
184 |
generate_button = gr.Button("QUIERO VER MI SUE脩O", elem_id="generate-button", variant="primary")
|
|
|
185 |
|
186 |
with gr.Column(scale=1):
|
187 |
image_output = gr.Image(type="pil", label="Image Output", elem_id="gallery")
|
188 |
|
189 |
generate_button.click(query, inputs=[text_prompt, negative_prompt, steps, cfg, method, strength], outputs=image_output)
|
|
|
190 |
|
191 |
app.launch(show_api=False, share=False)
|