Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ import requests
|
|
21 |
st.set_page_config(page_title="DeepInsightz", page_icon=":bar_chart:", layout="wide")
|
22 |
|
23 |
# Custom CSS for dynamic theme styling
|
24 |
-
#
|
25 |
if st.get_option("theme.base") == "dark":
|
26 |
background_color = "#282828"
|
27 |
text_color = "white"
|
@@ -39,6 +39,7 @@ else:
|
|
39 |
primary_color = '#228B22' # for positive delta in light mode
|
40 |
negative_color = '#8B0000' # for negative delta in light mode
|
41 |
|
|
|
42 |
st.markdown(f"""
|
43 |
<style>
|
44 |
body {{
|
@@ -61,9 +62,42 @@ st.markdown(f"""
|
|
61 |
[data-testid="stSidebar"] {{
|
62 |
background-color: {sidebar_color};
|
63 |
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
</style>
|
65 |
""", unsafe_allow_html=True)
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
# Load CSV files at the top
|
68 |
df = pd.read_csv("df_clean.csv")
|
69 |
nombres_proveedores = pd.read_csv("nombres_proveedores.csv", sep=';')
|
|
|
21 |
st.set_page_config(page_title="DeepInsightz", page_icon=":bar_chart:", layout="wide")
|
22 |
|
23 |
# Custom CSS for dynamic theme styling
|
24 |
+
# Custom CSS for dynamic theme styling
|
25 |
if st.get_option("theme.base") == "dark":
|
26 |
background_color = "#282828"
|
27 |
text_color = "white"
|
|
|
39 |
primary_color = '#228B22' # for positive delta in light mode
|
40 |
negative_color = '#8B0000' # for negative delta in light mode
|
41 |
|
42 |
+
# Load custom CSS for dynamic theme and Lottie animation
|
43 |
st.markdown(f"""
|
44 |
<style>
|
45 |
body {{
|
|
|
62 |
[data-testid="stSidebar"] {{
|
63 |
background-color: {sidebar_color};
|
64 |
}}
|
65 |
+
.overlay {{
|
66 |
+
position: fixed;
|
67 |
+
top: 0;
|
68 |
+
left: 0;
|
69 |
+
width: 100%;
|
70 |
+
height: 100%;
|
71 |
+
display: flex;
|
72 |
+
justify-content: center;
|
73 |
+
align-items: center;
|
74 |
+
background-color: rgba(0, 0, 0, 0.5);
|
75 |
+
z-index: 1000;
|
76 |
+
transition: opacity 0.5s ease;
|
77 |
+
}}
|
78 |
+
.overlay.hidden {{
|
79 |
+
display: none;
|
80 |
+
}}
|
81 |
+
.overlay.active {{
|
82 |
+
opacity: 1;
|
83 |
+
pointer-events: all;
|
84 |
+
}}
|
85 |
+
.overlay.inactive {{
|
86 |
+
opacity: 0;
|
87 |
+
pointer-events: none;
|
88 |
+
}}
|
89 |
</style>
|
90 |
""", unsafe_allow_html=True)
|
91 |
|
92 |
+
# Function to show Lottie animation as an overlay
|
93 |
+
def display_lottie_animation(show_animation):
|
94 |
+
if show_animation:
|
95 |
+
st.markdown('<div class="overlay active">', unsafe_allow_html=True)
|
96 |
+
st_lottie(lottie_animation, height=300, width=300)
|
97 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
98 |
+
else:
|
99 |
+
st.markdown('<div class="overlay inactive hidden">', unsafe_allow_html=True)
|
100 |
+
|
101 |
# Load CSV files at the top
|
102 |
df = pd.read_csv("df_clean.csv")
|
103 |
nombres_proveedores = pd.read_csv("nombres_proveedores.csv", sep=';')
|