MCPcopy Create free account
hub / github.com/Hrishikesh332/HCDS-EPD / create_sidebar

Function create_sidebar

app.py:117–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 st.markdown('</div>', unsafe_allow_html=True)
116
117def create_sidebar():
118 st.sidebar.title("")
119 st.sidebar.markdown("")
120
121 pages = {
122 "Dashboard": "dashboard",
123 "Forecast": "forecasting",
124 "Fairness": "fairness",
125 "Anomaly": "outliers",
126 "Grouping": "clustering",
127 "Categories": "categories"
128 }
129
130 current_page = st.session_state.current_page
131
132 for page_name, page_key in pages.items():
133 if st.sidebar.button(
134 page_name,
135 key=f"sidebar_{page_key}",
136 use_container_width=True,
137 type="primary" if current_page == page_key else "secondary"
138 ):
139 st.session_state.current_page = page_key
140 st.rerun()
141
142@st.cache_data
143def load_and_cache_data():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected