JeCabrera commited on
Commit
ae5207e
·
verified ·
1 Parent(s): 348d961

Upload 8 files

Browse files
Files changed (2) hide show
  1. app.py +8 -4
  2. static/css/style.css +3 -6
app.py CHANGED
@@ -10,16 +10,19 @@ def load_css(file_path):
10
  with open(file_path) as f:
11
  st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
12
 
13
- # Intentar cargar el CSS personalizado
14
  try:
15
- load_css('static/css/style.css')
16
- except FileNotFoundError:
 
 
17
  # Si el archivo no existe, crear un estilo básico en línea
18
  st.markdown("""
19
  <style>
20
  .robocopy-title {
21
- color: #4ECDC4;
22
  font-weight: bold;
 
23
  }
24
  </style>
25
  """, unsafe_allow_html=True)
@@ -51,6 +54,7 @@ with st.sidebar:
51
  # Usar HTML para aplicar la clase al título RoboCopy
52
  st.image("assets/robocopy_logo.png", width=200)
53
  st.markdown('<h1 class="robocopy-title">RoboCopy</h1>', unsafe_allow_html=True)
 
54
  st.write('# Past Chats')
55
  if st.session_state.get('chat_id') is None:
56
  st.session_state.chat_id = st.selectbox(
 
10
  with open(file_path) as f:
11
  st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
12
 
13
+ # Intentar cargar el CSS personalizado con ruta absoluta para mayor seguridad
14
  try:
15
+ css_path = os.path.join(os.path.dirname(__file__), 'static', 'css', 'style.css')
16
+ load_css(css_path)
17
+ except Exception as e:
18
+ print(f"Error al cargar CSS: {e}")
19
  # Si el archivo no existe, crear un estilo básico en línea
20
  st.markdown("""
21
  <style>
22
  .robocopy-title {
23
+ color: #4ECDC4 !important;
24
  font-weight: bold;
25
+ font-size: 2em;
26
  }
27
  </style>
28
  """, unsafe_allow_html=True)
 
54
  # Usar HTML para aplicar la clase al título RoboCopy
55
  st.image("assets/robocopy_logo.png", width=200)
56
  st.markdown('<h1 class="robocopy-title">RoboCopy</h1>', unsafe_allow_html=True)
57
+ # No uses st.write para el título, ya que podría sobrescribir los estilos
58
  st.write('# Past Chats')
59
  if st.session_state.get('chat_id') is None:
60
  st.session_state.chat_id = st.selectbox(
static/css/style.css CHANGED
@@ -1,9 +1,6 @@
1
  /* Estilos personalizados para RoboCopy */
2
-
3
- /* Estilo específico para el título RoboCopy */
4
  .robocopy-title {
5
- color: #4ECDC4; /* Color turquesa que coincide con el logo */
6
  font-weight: bold;
7
- }
8
-
9
- /* Mantener los demás estilos sin cambios */
 
1
  /* Estilos personalizados para RoboCopy */
 
 
2
  .robocopy-title {
3
+ color: #4ECDC4 !important; /* Color turquesa con !important para forzar el estilo */
4
  font-weight: bold;
5
+ font-size: 2em; /* Tamaño más grande para destacar */
6
+ }