Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -79,9 +79,34 @@ def get_gemini_response(target_audience, product, text_type, length, mood, model
|
|
| 79 |
st.set_page_config(page_title="VisionTales", layout="wide")
|
| 80 |
st.title("VisionTales: Crea historias inolvidables con IA")
|
| 81 |
|
| 82 |
-
#
|
| 83 |
-
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
target_audience = st.text_input("¿Quién es tu público objetivo?")
|
| 86 |
product = st.text_input("¿Qué producto tienes en mente?")
|
| 87 |
text_type = st.selectbox("Tipo de texto", ["Historia", "Carta de venta", "Correo", "Landing page"])
|
|
@@ -89,7 +114,7 @@ with st.sidebar:
|
|
| 89 |
mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Emocional", "Persuasivo"])
|
| 90 |
model_choice = st.selectbox("Modelo", ["gemini-1.5-flash", "gemini-1.5-pro"])
|
| 91 |
|
| 92 |
-
# Botón para generar el texto (
|
| 93 |
if st.button("Escribir mi texto"):
|
| 94 |
try:
|
| 95 |
# Obtener la respuesta del modelo
|
|
|
|
| 79 |
st.set_page_config(page_title="VisionTales", layout="wide")
|
| 80 |
st.title("VisionTales: Crea historias inolvidables con IA")
|
| 81 |
|
| 82 |
+
# Añadir CSS personalizado para el botón
|
| 83 |
+
st.markdown("""
|
| 84 |
+
<style>
|
| 85 |
+
div.stButton > button {
|
| 86 |
+
background-color: #FFCC00; /* Color llamativo */
|
| 87 |
+
color: black; /* Texto en negro */
|
| 88 |
+
width: 90%;
|
| 89 |
+
height: 60px;
|
| 90 |
+
font-weight: bold;
|
| 91 |
+
font-size: 22px; /* Tamaño más grande */
|
| 92 |
+
text-transform: uppercase; /* Texto en mayúsculas */
|
| 93 |
+
border: 1px solid #000000; /* Borde negro de 1px */
|
| 94 |
+
border-radius: 8px;
|
| 95 |
+
display: block;
|
| 96 |
+
margin: 0 auto; /* Centramos el botón */
|
| 97 |
+
}
|
| 98 |
+
div.stButton > button:hover {
|
| 99 |
+
background-color: #FFD700; /* Color al pasar el mouse */
|
| 100 |
+
color: black; /* Texto sigue en negro */
|
| 101 |
+
}
|
| 102 |
+
</style>
|
| 103 |
+
""", unsafe_allow_html=True)
|
| 104 |
+
|
| 105 |
+
# Crear dos columnas para el diseño (40% y 60%)
|
| 106 |
+
col1, col2 = st.columns([2, 3]) # 2 + 3 = 5 partes en total
|
| 107 |
+
|
| 108 |
+
with col1:
|
| 109 |
+
# Crear campos de entrada
|
| 110 |
target_audience = st.text_input("¿Quién es tu público objetivo?")
|
| 111 |
product = st.text_input("¿Qué producto tienes en mente?")
|
| 112 |
text_type = st.selectbox("Tipo de texto", ["Historia", "Carta de venta", "Correo", "Landing page"])
|
|
|
|
| 114 |
mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Emocional", "Persuasivo"])
|
| 115 |
model_choice = st.selectbox("Modelo", ["gemini-1.5-flash", "gemini-1.5-pro"])
|
| 116 |
|
| 117 |
+
# Botón para generar el texto (dentro de la interfaz principal)
|
| 118 |
if st.button("Escribir mi texto"):
|
| 119 |
try:
|
| 120 |
# Obtener la respuesta del modelo
|