File size: 995 Bytes
91ec262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
import streamlit as st
st.set_page_config(layout="wide")
from streamlit_option_menu import option_menu
from apps import home,eda,models,demo





if not "valid_inputs_received" in st.session_state:
    st.session_state["valid_inputs_received"] = False
# image = Image.open('data/logo.png')
# image=image.resize((100,100))
header = st.container()

apps = [
    {"func": home.app, "title": "Home", "icon": "house"},
    {"func": eda.app, "title": "EDA", "icon": "bar-chart"},
    # {"func": models.app, "title": "Models", "icon": "cpu"},
    {"func": demo.app, "title": "Demo", "icon": "cloud-upload"},
]

titles = [app["title"] for app in apps]
titles_lower = [title.lower() for title in titles]
icons = [app["icon"] for app in apps]



with st.sidebar:
    # logo = st.image(image)
    selected = option_menu(
        "Main Menu",
        options=titles,
        icons=icons,
        menu_icon="cast",
    )

for app in apps:
    if app["title"] == selected:
        app["func"]()
        break