File size: 817 Bytes
7d9ce90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
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
# Main function to control the app
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() |