Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -212,37 +212,21 @@ st.markdown("""
|
|
| 212 |
</style>
|
| 213 |
""", unsafe_allow_html=True)
|
| 214 |
|
| 215 |
-
#
|
| 216 |
-
st.
|
| 217 |
-
<style>
|
| 218 |
-
textarea {
|
| 219 |
-
font-size: 18px !important;
|
| 220 |
-
width: 100% !important;
|
| 221 |
-
height: 1em !important;
|
| 222 |
-
min-height: 1.5em !important;
|
| 223 |
-
max-height: 200px !important;
|
| 224 |
-
overflow: auto !important;
|
| 225 |
-
line-height: 1.5;
|
| 226 |
-
padding: 5px;
|
| 227 |
-
}
|
| 228 |
-
</style>
|
| 229 |
-
""", unsafe_allow_html=True)
|
| 230 |
-
|
| 231 |
-
# Crear columnas ajustadas al 40% y 60%
|
| 232 |
-
col1, col2 = st.columns([0.4, 0.6])
|
| 233 |
|
| 234 |
-
# Columnas de entrada
|
| 235 |
with col1:
|
| 236 |
-
target_audience = st.
|
| 237 |
-
product = st.
|
| 238 |
-
call_to_action = st.
|
| 239 |
number_of_ctas = st.selectbox("Número de llamados a la acción", options=[1, 2, 3, 4, 5], index=2)
|
| 240 |
temperature = st.slider("Creatividad", min_value=0.0, max_value=1.0, value=0.5, step=0.1)
|
| 241 |
|
| 242 |
# Botón de enviar
|
| 243 |
submit = st.button("Generar Llamados a la Acción")
|
| 244 |
|
| 245 |
-
# Mostrar los llamados a la acción generados
|
| 246 |
if submit:
|
| 247 |
if target_audience and product and call_to_action:
|
| 248 |
try:
|
|
@@ -259,4 +243,5 @@ if submit:
|
|
| 259 |
except Exception as e:
|
| 260 |
col2.error(f"Error inesperado: {str(e)}")
|
| 261 |
else:
|
| 262 |
-
col2.error("Por favor, proporciona el público objetivo, el producto y la acción.")
|
|
|
|
|
|
| 212 |
</style>
|
| 213 |
""", unsafe_allow_html=True)
|
| 214 |
|
| 215 |
+
# Crear columnas
|
| 216 |
+
col1, col2 = st.columns([1, 2])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
+
# Columnas de entrada
|
| 219 |
with col1:
|
| 220 |
+
target_audience = st.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Estudiantes Universitarios")
|
| 221 |
+
product = st.text_input("¿Qué producto tienes en mente?", placeholder="Ejemplo: Curso de Inglés")
|
| 222 |
+
call_to_action = st.text_input("¿Qué acción deseas que tomen?", placeholder="Ejemplo: Inscribirse al curso")
|
| 223 |
number_of_ctas = st.selectbox("Número de llamados a la acción", options=[1, 2, 3, 4, 5], index=2)
|
| 224 |
temperature = st.slider("Creatividad", min_value=0.0, max_value=1.0, value=0.5, step=0.1)
|
| 225 |
|
| 226 |
# Botón de enviar
|
| 227 |
submit = st.button("Generar Llamados a la Acción")
|
| 228 |
|
| 229 |
+
# Mostrar los llamados a la acción generados
|
| 230 |
if submit:
|
| 231 |
if target_audience and product and call_to_action:
|
| 232 |
try:
|
|
|
|
| 243 |
except Exception as e:
|
| 244 |
col2.error(f"Error inesperado: {str(e)}")
|
| 245 |
else:
|
| 246 |
+
col2.error("Por favor, proporciona el público objetivo, el producto y la acción.")
|
| 247 |
+
|