JeCabrera commited on
Commit
46ad785
·
verified ·
1 Parent(s): fe3510c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -64,12 +64,28 @@ css = """
64
  padding: 20px; /* Espacio interno */
65
  }
66
 
 
 
 
 
 
67
  input, textarea, select {
68
  background-color: #f5f5f5; /* Fondo gris claro para inputs */
69
  color: #333333; /* Texto gris oscuro en inputs */
70
  border: 1px solid #cccccc; /* Borde gris claro en inputs */
71
  width: 100%; /* Ancho completo del input */
72
  box-sizing: border-box; /* Incluir el borde en el ancho total */
 
 
 
 
 
 
 
 
 
 
 
73
  }
74
 
75
  button {
@@ -140,8 +156,13 @@ with gr.Blocks(css=css) as app:
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(
147
  label="¿Qué elementos no deseas que se plasmen de tu sueño?",
 
64
  padding: 20px; /* Espacio interno */
65
  }
66
 
67
+ .input-container {
68
+ position: relative;
69
+ width: 100%;
70
+ }
71
+
72
  input, textarea, select {
73
  background-color: #f5f5f5; /* Fondo gris claro para inputs */
74
  color: #333333; /* Texto gris oscuro en inputs */
75
  border: 1px solid #cccccc; /* Borde gris claro en inputs */
76
  width: 100%; /* Ancho completo del input */
77
  box-sizing: border-box; /* Incluir el borde en el ancho total */
78
+ padding-right: 30px; /* Espacio para el botón "x" */
79
+ }
80
+
81
+ .clear-button {
82
+ position: absolute;
83
+ right: 5px;
84
+ top: 50%;
85
+ transform: translateY(-50%);
86
+ cursor: pointer;
87
+ color: #666;
88
+ font-size: 14px;
89
  }
90
 
91
  button {
 
156
 
157
  with gr.Row():
158
  with gr.Column(scale=1):
159
+ gr.HTML("""
160
+ <div class="input-container">
161
+ <input type="text" id="prompt-text-input" placeholder="Describe lo que soñaste, no omitas ningún detalle." />
162
+ <span class="clear-button" onclick="document.getElementById('prompt-text-input').value=''">×</span>
163
+ </div>
164
+ """)
165
+
166
  with gr.Accordion("Opciones Avanzadas", open=False):
167
  negative_prompt = gr.Textbox(
168
  label="¿Qué elementos no deseas que se plasmen de tu sueño?",