-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDyslexiaML.py
106 lines (71 loc) · 2.99 KB
/
DyslexiaML.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
"""Main module for the streamlit Dyslexia app"""
import streamlit as st
import time
def local_css(file_name):
with open(file_name) as f:
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
def remote_css(url):
st.markdown(f'<link href="{url}" rel="stylesheet">', unsafe_allow_html=True)
def icon(icon_name):
st.markdown(f'<i class="material-icons">{icon_name}</i>', unsafe_allow_html=True)
#local_css("style.css")
#remote_css('https://fonts.googleapis.com/icon?family=Material+Icons')
import pages.home
import pages.quiz
import pages.survey
import pages.login
PAGES = {
"Login": pages.login,
"Home": pages.home,
"Quiz": pages.quiz,
"Survey": pages.survey
}
# st.sidebar.title("Pages")
# radio = st.sidebar.radio(label="", options=["Set A", "Set B", "Add them"])
# session_state = SessionState.get(a=0, b=0) # Pick some initial values.
# if radio == "Set A":
# session_state.a = float(st.text_input(label="What is a?", value=session_state.a))
# st.write(f"You set a to {session_state.a}")
# elif radio == "Set B":
# session_state.b = float(st.text_input(label="What is b?", value=session_state.b))
# st.write(f"You set b to {session_state.b}")
# elif radio == "Add them":
# st.write(f"a={session_state.a} and b={session_state.b}")
# button = st.button("Add a and b")
# if button:
# st.write(f"a+b={session_state.a+session_state.b}")
def main():
st.sidebar.title("DyslexiaML")
st.sidebar.text(" ""AI for Dyslexia"" ")
st.sidebar.title("Navigation")
page = st.sidebar.radio("Go to", list(PAGES.keys()))
with st.spinner(text = f"Loading {page} ..."):
PAGES[page].main()
st.sidebar.title("About App")
st.sidebar.info(
"""
This App uses Machine Learning to Detect Dyslexia.
It uses Streamlit for implemention of beatiful and easy web app.
"""
)
st.sidebar.title("Contact Developer")
st.sidebar.info(
"""
This app is develop by Dyslexiaworkin Organization. You can contact us at
[Dyslexiaworkin](https://github.com/dyslexiaworkin).
"""
)
#st.sidebar.markdown("[![Github](https://github.com/aryanc55/NLPJenny/blob/master/assests/github.png?raw=true)](https://github/aryanc55)")
st.sidebar.markdown(
""" [Github](https://github.com/dyslexiaworkin)""") # change all thses three to to iamge
st.sidebar.markdown(""" [Twitter](https://twitter.com/aryanc55)""")
st.sidebar.title("Souce Code")
st.sidebar.info(
"This an free to use template repository and you are very welcome to **contribute** your awesome "
"comments, questions, resources and apps as "
"[issues](https://github.com/dyslexiaworkin/DyslexiaML/issues) of or "
"[pull requests](https://github.com/dyslexiaworkin/DyslexiaML/pulls) "
"to the [source code](https://github.com/dyslexiaworkin/DyslexiaML). "
)
if __name__ == "__main__":
main()