|
import streamlit as st |
|
import pandas as pd |
|
from streamlit_option_menu import option_menu |
|
|
|
from pages.analytics import analytics |
|
from pages.about import about |
|
from pages.prediction import prediction |
|
|
|
|
|
def main(): |
|
|
|
def get_data(path="data/penguins.csv"): |
|
data = pd.read_csv(path) |
|
filtered_data = data.dropna() |
|
return filtered_data |
|
|
|
df = get_data() |
|
|
|
with st.sidebar: |
|
selected = option_menu("Main Menu", ["About", 'Analytics', 'Prediction'], |
|
icons=['home', ':bar_chart:', ':robot_face:'], menu_icon="cast", default_index=0) |
|
if selected == "About": |
|
about() |
|
elif selected == "Analytics": |
|
analytics(df) |
|
elif selected == "Prediction": |
|
prediction() |
|
|
|
if __name__ == "__main__": |
|
main() |