Spaces:
Sleeping
Sleeping
GMARTINEZMILLA
commited on
Commit
·
8ca9f60
1
Parent(s):
77c744c
feat: Changed colours to right dataframe bars
Browse files
app.py
CHANGED
@@ -16,7 +16,6 @@ from utils import recomienda_tf
|
|
16 |
st.set_page_config(page_title="DeepInsightz", page_icon=":bar_chart:", layout="wide")
|
17 |
|
18 |
# Custom CSS for dynamic theme styling
|
19 |
-
# Streamlit detects light and dark mode automatically via the user's settings in Hugging Face Spaces
|
20 |
if st.get_option("theme.base") == "dark":
|
21 |
background_color = "#282828"
|
22 |
text_color = "white"
|
@@ -25,14 +24,16 @@ if st.get_option("theme.base") == "dark":
|
|
25 |
plot_bgcolor = "rgba(0, 0, 0, 0)"
|
26 |
primary_color = '#00FF00' # for positive delta
|
27 |
negative_color = '#FF0000' # for negative delta
|
|
|
28 |
else:
|
29 |
background_color = "#f4f4f4"
|
30 |
-
text_color = "#black"
|
31 |
metric_box_color = "#dee2e8"
|
32 |
sidebar_color = "#dee2e8"
|
33 |
plot_bgcolor = "#f4f4f4"
|
34 |
primary_color = '#228B22' # for positive delta in light mode
|
35 |
negative_color = '#8B0000' # for negative delta in light mode
|
|
|
36 |
|
37 |
st.markdown(f"""
|
38 |
<style>
|
@@ -56,6 +57,9 @@ st.markdown(f"""
|
|
56 |
[data-testid="stSidebar"] {{
|
57 |
background-color: {sidebar_color};
|
58 |
}}
|
|
|
|
|
|
|
59 |
</style>
|
60 |
""", unsafe_allow_html=True)
|
61 |
|
@@ -264,8 +268,7 @@ if page == "📃 Resumen":
|
|
264 |
"Venta Total (€)",
|
265 |
format="%d",
|
266 |
min_value=0,
|
267 |
-
max_value=ventas_top_100['total_sales'].max()
|
268 |
-
fill_color=["#b3d9ff", "#0066cc"]
|
269 |
)}
|
270 |
)
|
271 |
# Customer Analysis Page
|
|
|
16 |
st.set_page_config(page_title="DeepInsightz", page_icon=":bar_chart:", layout="wide")
|
17 |
|
18 |
# Custom CSS for dynamic theme styling
|
|
|
19 |
if st.get_option("theme.base") == "dark":
|
20 |
background_color = "#282828"
|
21 |
text_color = "white"
|
|
|
24 |
plot_bgcolor = "rgba(0, 0, 0, 0)"
|
25 |
primary_color = '#00FF00' # for positive delta
|
26 |
negative_color = '#FF0000' # for negative delta
|
27 |
+
progress_fill_color = '#0066cc' # Blue for dark mode
|
28 |
else:
|
29 |
background_color = "#f4f4f4"
|
30 |
+
text_color = "#000000" # Fixed typo: "#black" -> "#000000"
|
31 |
metric_box_color = "#dee2e8"
|
32 |
sidebar_color = "#dee2e8"
|
33 |
plot_bgcolor = "#f4f4f4"
|
34 |
primary_color = '#228B22' # for positive delta in light mode
|
35 |
negative_color = '#8B0000' # for negative delta in light mode
|
36 |
+
progress_fill_color = '#228B22' # Green for light mode
|
37 |
|
38 |
st.markdown(f"""
|
39 |
<style>
|
|
|
57 |
[data-testid="stSidebar"] {{
|
58 |
background-color: {sidebar_color};
|
59 |
}}
|
60 |
+
.stProgress > div > div > div > div {{
|
61 |
+
background-color: {progress_fill_color};
|
62 |
+
}}
|
63 |
</style>
|
64 |
""", unsafe_allow_html=True)
|
65 |
|
|
|
268 |
"Venta Total (€)",
|
269 |
format="%d",
|
270 |
min_value=0,
|
271 |
+
max_value=ventas_top_100['total_sales'].max()
|
|
|
272 |
)}
|
273 |
)
|
274 |
# Customer Analysis Page
|