Spaces:
Sleeping
Sleeping
| """Streamlit entry point β navigation controller.""" | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent)) | |
| import streamlit as st | |
| from customer_intelligence.app.components.styles import inject_css | |
| st.set_page_config( | |
| page_title="Customer Intelligence Platform", | |
| page_icon="π", | |
| layout="wide", | |
| initial_sidebar_state="expanded", | |
| ) | |
| inject_css() | |
| # Sidebar branding header | |
| st.sidebar.markdown( | |
| '<div style="padding:14px 4px 18px;border-bottom:1px solid rgba(59,130,246,0.22);margin-bottom:6px;">' | |
| '<div style="font-size:1.1rem;font-weight:800;letter-spacing:-0.01em;line-height:1.3;">π Customer Intelligence</div>' | |
| '<div style="font-size:0.72rem;opacity:0.55;margin-top:4px;letter-spacing:0.03em;">OLIST E-COMMERCE ANALYTICS</div>' | |
| '</div>', | |
| unsafe_allow_html=True, | |
| ) | |
| pg = st.navigation( | |
| { | |
| "": [ | |
| st.Page("home.py", title="Home", icon="π ", default=True), | |
| ], | |
| "Analytics": [ | |
| st.Page("pages/01_overview.py", title="Overview", icon="π"), | |
| st.Page("pages/02_revenue.py", title="Revenue", icon="π°"), | |
| ], | |
| "Customer": [ | |
| st.Page("pages/03_customers.py", title="Customers", icon="π₯"), | |
| st.Page("pages/06_segmentation.py", title="Segmentation", icon="π’"), | |
| st.Page("pages/08_cohorts.py", title="Cohort Retention", icon="π"), | |
| ], | |
| "Operations": [ | |
| st.Page("pages/04_delivery.py", title="Delivery", icon="π"), | |
| st.Page("pages/05_sellers.py", title="Sellers", icon="πͺ"), | |
| ], | |
| "ML": [ | |
| st.Page("pages/07_predictions.py", title="Predictions", icon="π€"), | |
| ], | |
| } | |
| ) | |
| pg.run() | |