Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -69,6 +69,25 @@ st.set_page_config(page_title="Poetic Vision", page_icon=":pencil:", layout="wid
|
|
69 |
st.title("Story Maker App :pencil:")
|
70 |
st.markdown("### Upload your image or provide a prompt to create a Vision around that: ")
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
# Create two columns for layout (40% and 60%)
|
73 |
col1, col2 = st.columns([2, 3]) # 2 + 3 = 5 parts total
|
74 |
|
@@ -84,23 +103,8 @@ with col1:
|
|
84 |
language = st.selectbox("Idioma del texto:", ["Inglés", "Español"])
|
85 |
mood = st.selectbox("Estado de ánimo:", ["Emocional", "Triste", "Feliz", "Horror", "Comedia", "Romántico"])
|
86 |
|
87 |
-
#
|
88 |
-
st.
|
89 |
-
<style>
|
90 |
-
.big-button {
|
91 |
-
background-color: #FFCC00; /* Color llamativo */
|
92 |
-
color: white;
|
93 |
-
width: 90%;
|
94 |
-
height: 50px; /* Altura del botón */
|
95 |
-
font-size: 20px; /* Tamaño de fuente */
|
96 |
-
border: none;
|
97 |
-
border-radius: 5px; /* Bordes redondeados */
|
98 |
-
cursor: pointer;
|
99 |
-
}
|
100 |
-
</style>
|
101 |
-
<button class="big-button" onclick="document.getElementById('generate_button').click();">Escribir historia</button>
|
102 |
-
<input type="submit" id="generate_button" style="display:none;">
|
103 |
-
""", unsafe_allow_html=True)
|
104 |
|
105 |
# Display uploaded image
|
106 |
if uploaded_file is not None:
|
@@ -108,7 +112,7 @@ if uploaded_file is not None:
|
|
108 |
col1.image(image, caption="Imagen subida", use_column_width=True)
|
109 |
|
110 |
# Handle submit action
|
111 |
-
if
|
112 |
if uploaded_file or input_prompt:
|
113 |
try:
|
114 |
image_data = input_image_setup(uploaded_file)
|
|
|
69 |
st.title("Story Maker App :pencil:")
|
70 |
st.markdown("### Upload your image or provide a prompt to create a Vision around that: ")
|
71 |
|
72 |
+
# Add custom CSS for the button
|
73 |
+
st.markdown("""
|
74 |
+
<style>
|
75 |
+
div.stButton > button {
|
76 |
+
background-color: #FFCC00; /* Color llamativo */
|
77 |
+
color: white;
|
78 |
+
width: 90%; /* 90% del ancho */
|
79 |
+
height: 50px; /* Altura del botón */
|
80 |
+
font-size: 18px; /* Tamaño de la fuente */
|
81 |
+
border: none;
|
82 |
+
border-radius: 8px;
|
83 |
+
}
|
84 |
+
div.stButton > button:hover {
|
85 |
+
background-color: #FFD700; /* Color más claro al pasar el mouse */
|
86 |
+
color: black;
|
87 |
+
}
|
88 |
+
</style>
|
89 |
+
""", unsafe_allow_html=True)
|
90 |
+
|
91 |
# Create two columns for layout (40% and 60%)
|
92 |
col1, col2 = st.columns([2, 3]) # 2 + 3 = 5 parts total
|
93 |
|
|
|
103 |
language = st.selectbox("Idioma del texto:", ["Inglés", "Español"])
|
104 |
mood = st.selectbox("Estado de ánimo:", ["Emocional", "Triste", "Feliz", "Horror", "Comedia", "Romántico"])
|
105 |
|
106 |
+
# Generate button con el nuevo estilo y ancho ajustado
|
107 |
+
submit = st.button("Escribir historia")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
# Display uploaded image
|
110 |
if uploaded_file is not None:
|
|
|
112 |
col1.image(image, caption="Imagen subida", use_column_width=True)
|
113 |
|
114 |
# Handle submit action
|
115 |
+
if submit:
|
116 |
if uploaded_file or input_prompt:
|
117 |
try:
|
118 |
image_data = input_image_setup(uploaded_file)
|