"""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(
'
'
'
📊 Customer Intelligence
'
'
OLIST E-COMMERCE ANALYTICS
'
'
',
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()