-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
64 lines (52 loc) · 1.68 KB
/
main.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import streamlit as st
from PIL import Image
from apps.home import home_page
from apps.heart import heart_page
from apps.tb import tb_page
from apps.skin import skin_page
from apps.chatbot import chat_page
from streamlit_option_menu import option_menu
st.set_page_config(
page_title="Healthy",
page_icon="🧬",
layout="centered",
initial_sidebar_state="auto",
)
pages = {
"Home": home_page,
"Heart Disease Prediction": heart_page,
"Tubercolosis Detection": tb_page,
"Skin Cancer Classification": skin_page,
"Health Assistant": chat_page,
}
# For Horizontal Menu Layout
# selected_page = option_menu(
# menu_title = None,
# options = list(pages.keys()),
# icons=['house', 'heart', 'lungs', 'person', 'robot'],
# orientation="horizontal",
# )
# with st.sidebar:
# col1, col2, col3 = st.columns((1, 4, 1))
# with col2:
# st.image(Image.open("healthy.png"), caption="Your Health, Our Priority")
# st.sidebar.markdown("---")
# st.sidebar.markdown("made by [thebugged](https://github.com/thebugged)")
# For Vertical Menu Layout
with st.sidebar:
col1, col2, col3 = st.columns((1, 4, 1))
with col2:
st.image(Image.open("healthy.png"), caption="Your Health, Our Priority")
st.sidebar.markdown("---")
selected_page = option_menu(
None,
list(pages.keys()),
icons=['house', 'heart', 'lungs', 'person', 'robot'],
orientation='vertical',
)
st.sidebar.markdown("---")
st.sidebar.markdown("👨🏾💻 by [thebugged](https://github.com/thebugged)")
if selected_page in pages:
pages[selected_page]()
else:
st.markdown("### Invalid Page Selected")