Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,17 +36,26 @@ st.markdown("""
|
|
36 |
<h3 style='text-align: center;'>Escribe una idea y la IA creará una historia única.</h3>
|
37 |
""", unsafe_allow_html=True)
|
38 |
|
39 |
-
#
|
40 |
-
|
41 |
-
|
42 |
-
#
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
st.
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
<h3 style='text-align: center;'>Escribe una idea y la IA creará una historia única.</h3>
|
37 |
""", unsafe_allow_html=True)
|
38 |
|
39 |
+
# Crear dos columnas
|
40 |
+
col1, col2 = st.columns([1, 1])
|
41 |
+
|
42 |
+
# Columna izquierda para inputs
|
43 |
+
with col1:
|
44 |
+
# Entrada de texto
|
45 |
+
input_prompt = st.text_area("Escribe de qué quieres que trate la historia:", placeholder="Escribe aquí tu idea...")
|
46 |
+
|
47 |
+
# Opciones de personalización
|
48 |
+
genre = st.selectbox("Tipo de texto:", ["Historia", "Poema", "Cita", "Ensayo"])
|
49 |
+
length = st.selectbox("Longitud del texto:", ["Corto", "Largo"])
|
50 |
+
language = st.selectbox("Idioma del texto:", ["Español", "Inglés"])
|
51 |
+
mood = st.selectbox("Estado de ánimo:", ["Emocional", "Triste", "Feliz", "Horror", "Comedia", "Romántico"])
|
52 |
+
|
53 |
+
# Botón para generar contenido
|
54 |
+
generate_button = st.button("Generar historia")
|
55 |
+
|
56 |
+
# Columna derecha para la salida
|
57 |
+
with col2:
|
58 |
+
if generate_button:
|
59 |
+
response = get_gemini_response(input_prompt, genre, length, language, mood)
|
60 |
+
st.subheader("Contenido generado:")
|
61 |
+
st.write(response)
|