import streamlit as st
# Sidebar for navigation
st.sidebar.title("๐งญ Navigation")
option = st.sidebar.radio("Choose a module", ["Tips Dataset Explorer", "Tips Dataset Dashboard", "Basic Viewer"])
# Conditional loading based on sidebar selection
if option == "Tips Dataset Explorer":
from pages import project_1
elif option == "Tips Dataset Dashboard":
from pages import project_2
elif option == "Basic Viewer":
import pandas as pd
st.markdown("
๐ Tips Dataset Viewer
", unsafe_allow_html=True)
file = st.file_uploader("๐ Upload a CSV file", type=["csv"])
if file is not None:
df = pd.read_csv(file)
st.markdown("### ๐งพ Full DataFrame")
st.dataframe(df)
st.markdown("### ๐ First 5 Rows")
st.write(df.head())
st.markdown("### ๐ Last 5 Rows")
st.write(df.tail())
st.markdown("### ๐ Feature Types")
categorical_cols = df.select_dtypes(include='object').columns.tolist()
numerical_cols = df.select_dtypes(include=['int64', 'float64']).columns.tolist()
st.write("๐จ **Categorical Features:**", categorical_cols)
st.write("๐ฆ **Numerical Features:**", numerical_cols)
else:
st.info("โฌ๏ธ Please upload a CSV file to get started.")