Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,12 +39,8 @@ css_style = """
|
|
39 |
border-radius: 5px;
|
40 |
border: 1px solid #ccc;
|
41 |
}
|
42 |
-
.
|
43 |
-
|
44 |
-
}
|
45 |
-
.boton-enviar {
|
46 |
-
margin-top: -5px; /* Ajusta la posición vertical del botón */
|
47 |
-
vertical-align: middle;
|
48 |
}
|
49 |
</style>
|
50 |
"""
|
@@ -136,17 +132,17 @@ def procesar_consulta(user_question):
|
|
136 |
|
137 |
def main():
|
138 |
st.set_page_config(page_title="PDF Consultor 🔍", page_icon="🔍", layout="wide")
|
|
|
139 |
st.markdown(css_style, unsafe_allow_html=True)
|
140 |
-
|
141 |
-
# Título principal con estilo personalizado
|
142 |
-
st.markdown(f'<h1 class="titulo-principal">PDF Consultor 🔍</h1>', unsafe_allow_html=True)
|
143 |
|
144 |
# Inicializa estado de sesión
|
145 |
if 'documento_cargado' not in st.session_state:
|
146 |
st.session_state.documento_cargado = False
|
147 |
|
148 |
# Sidebar - Carga de documentos
|
149 |
-
|
|
|
|
|
150 |
st.markdown('<p class="step-number">1 Subir archivos</p>', unsafe_allow_html=True)
|
151 |
pdf_docs = st.file_uploader(
|
152 |
"Subir PDF(s)",
|
@@ -203,7 +199,8 @@ def main():
|
|
203 |
label_visibility="collapsed"
|
204 |
)
|
205 |
with col2:
|
206 |
-
|
|
|
207 |
|
208 |
if user_question and enviar:
|
209 |
procesar_consulta(user_question)
|
|
|
39 |
border-radius: 5px;
|
40 |
border: 1px solid #ccc;
|
41 |
}
|
42 |
+
.sidebar-desplazado {
|
43 |
+
margin-left: 50vw; /* Desplaza el sidebar hacia la derecha */
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
</style>
|
46 |
"""
|
|
|
132 |
|
133 |
def main():
|
134 |
st.set_page_config(page_title="PDF Consultor 🔍", page_icon="🔍", layout="wide")
|
135 |
+
st.title("PDF Consultor 🔍")
|
136 |
st.markdown(css_style, unsafe_allow_html=True)
|
|
|
|
|
|
|
137 |
|
138 |
# Inicializa estado de sesión
|
139 |
if 'documento_cargado' not in st.session_state:
|
140 |
st.session_state.documento_cargado = False
|
141 |
|
142 |
# Sidebar - Carga de documentos
|
143 |
+
sidebar_class = "sidebar-desplazado" if not st.session_state.documento_cargado else ""
|
144 |
+
|
145 |
+
with st.sidebar.container().add_class(sidebar_class):
|
146 |
st.markdown('<p class="step-number">1 Subir archivos</p>', unsafe_allow_html=True)
|
147 |
pdf_docs = st.file_uploader(
|
148 |
"Subir PDF(s)",
|
|
|
199 |
label_visibility="collapsed"
|
200 |
)
|
201 |
with col2:
|
202 |
+
st.markdown("<br>", unsafe_allow_html=True)
|
203 |
+
enviar = st.form_submit_button("Enviar ▶")
|
204 |
|
205 |
if user_question and enviar:
|
206 |
procesar_consulta(user_question)
|