-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathApp.py
46 lines (36 loc) · 1.05 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
# import the child scripts
import streamlit as st
import awesome_streamlit as ast
import src.pages.home
import src.pages.EDA
import src.pages.aboutUs
import src.pages.transcribe
import src.pages.pred
ast.core.services.other.set_logging_format()
# create the pages
PAGES = {
"Home": src.pages.home,
"Data visualisations":src.pages.EDA,
"Predictions": src.pages.transcribe,
"Prediction demo":src.pages.pred,
"About Us": src.pages.aboutUs,
}
# render the pages
def main():
st.sidebar.title("Transcription")
selection = st.sidebar.selectbox("Select", list(PAGES.keys()))
page = PAGES[selection]
with st.spinner(f"Loading {selection} ..."):
ast.shared.components.write_page(page)
if selection =="Home":
st.sidebar.title("INFORMATION")
st.sidebar.info(
"""
This App is created for The World Food Program to
transcribe the speech-to-text of Swahili Language.
"""
)
elif selection=="Predictions":
st.sidebar.title("")
if __name__ == "__main__":
main()