Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,6 +76,29 @@ st.set_page_config(page_title="Generador de Titulares", layout="wide")
|
|
76 |
st.markdown("<h1 style='text-align: center;'>Generador de Titulares</h1>", unsafe_allow_html=True)
|
77 |
st.markdown("<h4 style='text-align: center;'>Usa el poder de Gemini AI para crear titulares atractivos.</h4>", unsafe_allow_html=True)
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
# Crear columnas
|
80 |
col1, col2 = st.columns([1, 2]) # 1: tamaño de la columna izquierda, 2: tamaño de la columna derecha
|
81 |
|
@@ -91,12 +114,13 @@ with col1:
|
|
91 |
if target_audience and product:
|
92 |
# Obtener la respuesta del modelo
|
93 |
generated_headlines = generate_headlines(number_of_headlines, target_audience, product, temperature)
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
else:
|
96 |
-
|
97 |
|
98 |
-
# Columna de resultados
|
99 |
-
with col2:
|
100 |
-
if 'generated_headlines' in st.session_state:
|
101 |
-
st.markdown(f"**Estos son tus encabezados para enganchar a {target_audience}:**")
|
102 |
-
st.markdown(st.session_state.generated_headlines)
|
|
|
76 |
st.markdown("<h1 style='text-align: center;'>Generador de Titulares</h1>", unsafe_allow_html=True)
|
77 |
st.markdown("<h4 style='text-align: center;'>Usa el poder de Gemini AI para crear titulares atractivos.</h4>", unsafe_allow_html=True)
|
78 |
|
79 |
+
# Añadir CSS personalizado para el botón
|
80 |
+
st.markdown("""
|
81 |
+
<style>
|
82 |
+
div.stButton > button {
|
83 |
+
background-color: #FFCC00;
|
84 |
+
color: black;
|
85 |
+
width: 90%;
|
86 |
+
height: 60px;
|
87 |
+
font-weight: bold;
|
88 |
+
font-size: 22px;
|
89 |
+
text-transform: uppercase;
|
90 |
+
border: 1px solid #000000;
|
91 |
+
border-radius: 8px;
|
92 |
+
display: block;
|
93 |
+
margin: 0 auto;
|
94 |
+
}
|
95 |
+
div.stButton > button:hover {
|
96 |
+
background-color: #FFD700;
|
97 |
+
color: black;
|
98 |
+
}
|
99 |
+
</style>
|
100 |
+
""", unsafe_allow_html=True)
|
101 |
+
|
102 |
# Crear columnas
|
103 |
col1, col2 = st.columns([1, 2]) # 1: tamaño de la columna izquierda, 2: tamaño de la columna derecha
|
104 |
|
|
|
114 |
if target_audience and product:
|
115 |
# Obtener la respuesta del modelo
|
116 |
generated_headlines = generate_headlines(number_of_headlines, target_audience, product, temperature)
|
117 |
+
# Mostrar los bullets generados
|
118 |
+
col2.markdown(f"""
|
119 |
+
<div style="border: 1px solid #000000; padding: 5px; border-radius: 8px; background-color: #ffffff;">
|
120 |
+
<h4>Aquí están tus titulares:</h4>
|
121 |
+
<p>{generated_headlines}</p>
|
122 |
+
</div>
|
123 |
+
""", unsafe_allow_html=True)
|
124 |
else:
|
125 |
+
col2.error("Por favor, proporciona el público objetivo y el producto.")
|
126 |
|
|
|
|
|
|
|
|
|
|