-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.py
55 lines (48 loc) · 1.18 KB
/
app.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
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "model")))
import streamlit as st
from pages._pages import home
from pages._pages import about
from pages._pages import github
from pages._pages import try_it
routes = {
"Home": home.main,
"Try it out": try_it.main,
"About": about.main,
"GitHub": github.main,
}
st.set_page_config(
page_title="Brain Tumor Detection",
page_icon=":brain:",
layout="wide",
menu_items={
"Get Help": "https://github.com/hitaarthh/brain-tumor-detection",
"Report a bug": "https://github.com/hitaarthh/brain-tumor-detection/issues",
"About": "Detecting brain tumors using *deep Convolutional Neural Networks*",
},
initial_sidebar_state="collapsed",
)
st.markdown(
"""
<style>
[data-testid="collapsedControl"] {
display: none
}
[data-testid="stSelectbox"] .st-emotion-cache-13bfgw8 p {
font-size: 24px;
font-weight: bold;
}
</style>
""",
unsafe_allow_html=True,
)
def format_func(page):
return page[0]
page = st.selectbox(
"Menu",
list(routes.items()),
index=0,
format_func=format_func,
)
page[1]()