Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -103,46 +103,6 @@ def main():
|
|
103 |
"""Funci贸n principal para ejecutar la aplicaci贸n Streamlit."""
|
104 |
st.set_page_config(page_title="PDF Consultor 馃攳", page_icon="馃攳", layout="wide")
|
105 |
|
106 |
-
# Configuraci贸n de la apariencia de la aplicaci贸n
|
107 |
-
st.markdown(
|
108 |
-
"""
|
109 |
-
<style>
|
110 |
-
body {
|
111 |
-
background-color: #1E90FF;
|
112 |
-
color: white;
|
113 |
-
}
|
114 |
-
.sidebar .sidebar-content {
|
115 |
-
background-color: #00008B;
|
116 |
-
}
|
117 |
-
.main {
|
118 |
-
background-color: #00008B;
|
119 |
-
color: white;
|
120 |
-
}
|
121 |
-
.stButton>button {
|
122 |
-
background-color: #0b0175;
|
123 |
-
color: white;
|
124 |
-
}
|
125 |
-
/* Estilos personalizados para los botones espec铆ficos */
|
126 |
-
.custom-button button {
|
127 |
-
background-color: transparent;
|
128 |
-
border: 2px solid gray;
|
129 |
-
color: gray;
|
130 |
-
transition: all 0.3s ease;
|
131 |
-
margin-right: 10px; /* Espacio entre botones */
|
132 |
-
}
|
133 |
-
.custom-button button:hover {
|
134 |
-
background-color: gray;
|
135 |
-
color: white;
|
136 |
-
}
|
137 |
-
.custom-button {
|
138 |
-
display: flex;
|
139 |
-
gap: 10px; /* Espacio entre botones */
|
140 |
-
}
|
141 |
-
</style>
|
142 |
-
""",
|
143 |
-
unsafe_allow_html=True
|
144 |
-
)
|
145 |
-
|
146 |
st.title("PDF Consultor 馃攳")
|
147 |
|
148 |
with st.sidebar:
|
@@ -159,21 +119,21 @@ def main():
|
|
159 |
st.success("隆PDF procesado exitosamente!")
|
160 |
|
161 |
# Botones para preguntas predefinidas con estilo personalizado
|
162 |
-
st.markdown('<div class="custom-button">', unsafe_allow_html=True)
|
163 |
-
if st.button("Resumen", key="resumen_button"):
|
164 |
-
user_input("Realiza un resumen sobre los aspectos m谩s relevantes comentados en el documento")
|
165 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
166 |
-
|
167 |
-
st.markdown('<div class="custom-button">', unsafe_allow_html=True)
|
168 |
-
if st.button("Entidad", key="entidad_button"):
|
169 |
-
user_input("A qu茅 entidad pertenece el contenido del documento?")
|
170 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
171 |
-
|
172 |
-
st.markdown('<div class="custom-button">', unsafe_allow_html=True)
|
173 |
-
if st.button("Fecha implantaci贸n", key="fecha_button"):
|
174 |
-
user_input("En qu茅 fecha se implantar谩 el contenido del documento?")
|
175 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
user_question = st.text_input("Introduce tu pregunta", placeholder="驴Qu茅 quieres saber?")
|
178 |
|
179 |
if user_question:
|
|
|
103 |
"""Funci贸n principal para ejecutar la aplicaci贸n Streamlit."""
|
104 |
st.set_page_config(page_title="PDF Consultor 馃攳", page_icon="馃攳", layout="wide")
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
st.title("PDF Consultor 馃攳")
|
107 |
|
108 |
with st.sidebar:
|
|
|
119 |
st.success("隆PDF procesado exitosamente!")
|
120 |
|
121 |
# Botones para preguntas predefinidas con estilo personalizado
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
+
col1, col2, col3 = st.columns(3)
|
124 |
+
|
125 |
+
with col1:
|
126 |
+
if st.button("Resumen", key="resumen_button"):
|
127 |
+
user_input("Realiza un resumen sobre los aspectos m谩s relevantes comentados en el documento")
|
128 |
+
|
129 |
+
with col2:
|
130 |
+
if st.button("Entidad", key="entidad_button"):
|
131 |
+
user_input("A qu茅 entidad pertenece el contenido del documento?")
|
132 |
+
|
133 |
+
with col3:
|
134 |
+
if st.button("Fecha implantaci贸n", key="fecha_button"):
|
135 |
+
user_input("En qu茅 fecha se implantar谩 el contenido del documento?")
|
136 |
+
|
137 |
user_question = st.text_input("Introduce tu pregunta", placeholder="驴Qu茅 quieres saber?")
|
138 |
|
139 |
if user_question:
|