Spaces:
Runtime error
Runtime error
Upload 8 files
Browse files- app.py +23 -1
- static/css/style.css +9 -0
app.py
CHANGED
@@ -4,6 +4,26 @@ import joblib
|
|
4 |
import streamlit as st
|
5 |
import google.generativeai as genai
|
6 |
from dotenv import load_dotenv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
load_dotenv()
|
8 |
GOOGLE_API_KEY=os.environ.get('GOOGLE_API_KEY')
|
9 |
genai.configure(api_key=GOOGLE_API_KEY)
|
@@ -28,7 +48,9 @@ except:
|
|
28 |
|
29 |
# Sidebar allows a list of past chats
|
30 |
with st.sidebar:
|
31 |
-
|
|
|
|
|
32 |
st.write('# Past Chats')
|
33 |
if st.session_state.get('chat_id') is None:
|
34 |
st.session_state.chat_id = st.selectbox(
|
|
|
4 |
import streamlit as st
|
5 |
import google.generativeai as genai
|
6 |
from dotenv import load_dotenv
|
7 |
+
|
8 |
+
# Función para cargar CSS personalizado
|
9 |
+
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)
|
26 |
+
|
27 |
load_dotenv()
|
28 |
GOOGLE_API_KEY=os.environ.get('GOOGLE_API_KEY')
|
29 |
genai.configure(api_key=GOOGLE_API_KEY)
|
|
|
48 |
|
49 |
# Sidebar allows a list of past chats
|
50 |
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(
|
static/css/style.css
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 */
|