-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlectoria.py
More file actions
40 lines (25 loc) · 833 Bytes
/
lectoria.py
File metadata and controls
40 lines (25 loc) · 833 Bytes
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
"""Main module for the streamlit app"""
import streamlit as st
import awesome_streamlit as ast
# Import the pages of the App.
# For every page in the app use the format:
# import src.pages.PAGE
import src.pages.home
import src.pages.dashboard
# Not sure about the following line. We will maybe deprecate it later in favor
# AWS Incognito.
#ast.core.services.other.set_logging_format()
PAGES = {
"Home": src.pages.home,
"Analytics Dashboard": src.pages.dashboard,
#"About": src.pages.about,
}
def main():
"""Main function of the App"""
st.sidebar.title("Navigation")
selection = st.sidebar.selectbox("Go to", list(PAGES.keys()))
page = PAGES[selection]
with st.spinner(f"Loading {selection} ..."):
ast.shared.components.write_page(page)
if __name__ == "__main__":
main()