-
Notifications
You must be signed in to change notification settings - Fork 360
/
app.py
49 lines (40 loc) · 1.47 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
"""Main module for the streamlit app"""
import streamlit as st
import awesome_streamlit as ast
import src.pages.about
import src.pages.gallery.index
import src.pages.home
import src.pages.resources
import src.pages.vision
ast.core.services.other.set_logging_format()
PAGES = {
"Home": src.pages.home,
"Resources": src.pages.resources,
"Gallery": src.pages.gallery.index,
"Vision": src.pages.vision,
"About": src.pages.about,
}
def main():
"""Main function of the App"""
st.sidebar.title("Navigation")
selection = st.sidebar.radio("Go to", list(PAGES.keys()))
page = PAGES[selection]
with st.spinner(f"Loading {selection} ..."):
ast.shared.components.write_page(page)
st.sidebar.title("Contribute")
st.sidebar.info(
"This an open source project and you are very welcome to **contribute** your awesome "
"comments, questions, resources and apps as "
"[issues](https://github.com/MarcSkovMadsen/awesome-streamlit/issues) of or "
"[pull requests](https://github.com/MarcSkovMadsen/awesome-streamlit/pulls) "
"to the [source code](https://github.com/MarcSkovMadsen/awesome-streamlit). "
)
st.sidebar.title("About")
st.sidebar.info(
"""
This app is maintained by Marc Skov Madsen. You can learn more about me at
[datamodelsanalytics.com](https://datamodelsanalytics.com).
"""
)
if __name__ == "__main__":
main()