-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
97 lines (85 loc) · 2.21 KB
/
Copy pathapp.py
File metadata and controls
97 lines (85 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
"""
app.py : Main
"""
## Streamlit & UI
import streamlit as st
from streamlit_option_menu import option_menu
## Importing pages
from content.intro import introduction
from content.exploration import exploration
from content.preparation import preparation
from content.visualisation import visualisation
from content.modelisation import modelisation
from content.resources import resources
## Page title & favicon
st.set_page_config(page_title="Walmart Sales Forecasting", page_icon="images/favicon.png")
## Global CSS
st.markdown("""
<style>
/* KPI metric cards */
[data-testid="stMetric"] {
background-color: #EFF6FF;
border: 1px solid #BFDBFE;
border-radius: 10px;
padding: 16px 20px;
}
[data-testid="stMetricLabel"] {
font-size: 0.82rem;
color: #64748B;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
[data-testid="stMetricValue"] {
font-size: 1.8rem;
color: #0071CE;
font-weight: 700;
}
</style>
""", unsafe_allow_html=True)
## Sidebar menu
with st.sidebar:
st.image("images/trolley.png", width=72)
st.header("Walmart Sales Forecasting")
choice = option_menu(
menu_title="Summary",
options=[
"Introduction",
"Data Exploration",
"Data Processing",
"Visualization",
"Modeling",
"Resources",
],
icons=[
"house",
"search",
"gear",
"bar-chart",
"cpu",
"book",
],
default_index=0,
)
st.write("---")
st.markdown(
"<p style='text-align:center; font-size:0.85rem; color:gray; margin-bottom:6px;'>"
"Christophe NORET</p>",
unsafe_allow_html=True,
)
col1, col2 = st.columns(2)
col1.link_button("LinkedIn", "https://www.linkedin.com/in/christophenoret", width='stretch')
col2.link_button("GitHub", "https://github.com/cnoret", width='stretch')
## Main Menu
if choice == "Introduction":
introduction()
elif choice == "Data Exploration":
exploration()
elif choice == "Data Processing":
preparation()
elif choice == "Visualization":
visualisation()
elif choice == "Modeling":
modelisation()
else:
resources()