Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import streamlit as st
|
|
4 |
#st.logo(image=":material/medical_information:")
|
5 |
st.logo("images/medical_information_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.png")
|
6 |
st.sidebar.text("Project by JA-RAD")
|
7 |
-
|
8 |
|
9 |
# --- PAGE SETUP ---
|
10 |
home_page = st.Page(
|
@@ -15,13 +15,13 @@ home_page = st.Page(
|
|
15 |
|
16 |
type_text_page = st.Page(
|
17 |
page="pages/type_text.py",
|
18 |
-
title="type text",
|
19 |
icon=":material/keyboard:",
|
20 |
default=False,)
|
21 |
|
22 |
upload_file_page = st.Page(
|
23 |
page="pages/upload_file.py",
|
24 |
-
title="upload file (not yet active)",
|
25 |
icon=":material/file_upload:",
|
26 |
default=False,)
|
27 |
|
@@ -31,9 +31,27 @@ about_page = st.Page(
|
|
31 |
icon=":material/info:",
|
32 |
default=False)
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
# --- NAVIGATION SETUP ---
|
36 |
#pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
|
37 |
-
pg = st.navigation({"Home": [home_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
|
38 |
|
39 |
-
pg.run()
|
|
|
4 |
#st.logo(image=":material/medical_information:")
|
5 |
st.logo("images/medical_information_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.png")
|
6 |
st.sidebar.text("Project by JA-RAD")
|
7 |
+
st.sidebar.title("Navigation")
|
8 |
|
9 |
# --- PAGE SETUP ---
|
10 |
home_page = st.Page(
|
|
|
15 |
|
16 |
type_text_page = st.Page(
|
17 |
page="pages/type_text.py",
|
18 |
+
title="DEMO type text",
|
19 |
icon=":material/keyboard:",
|
20 |
default=False,)
|
21 |
|
22 |
upload_file_page = st.Page(
|
23 |
page="pages/upload_file.py",
|
24 |
+
title="DEMO upload file (not yet active)",
|
25 |
icon=":material/file_upload:",
|
26 |
default=False,)
|
27 |
|
|
|
31 |
icon=":material/info:",
|
32 |
default=False)
|
33 |
|
34 |
+
PAGES = {
|
35 |
+
"Home": "pages/home.py" ,
|
36 |
+
"DEMO type_text": "pages/type_text.py",
|
37 |
+
"DEMO upload file (not yet active)": "pages/upload_file.py",
|
38 |
+
"About": "pages/about.py",
|
39 |
+
}
|
40 |
+
|
41 |
+
#PAGES = {
|
42 |
+
# "Home": backend.home,
|
43 |
+
# "Arabic Text Preprocessor": backend.processor,
|
44 |
+
# "Arabic Language Generation": backend.aragpt,
|
45 |
+
# "Arabic Sentiment Analysis": backend.sa,
|
46 |
+
# # "Arabic Sarcasm Detection": backend.sarcasm,
|
47 |
+
# "Arabic Question Answering": backend.qa,
|
48 |
+
#}
|
49 |
+
|
50 |
+
selection = st.sidebar.radio("Pages", list(PAGES.keys()))
|
51 |
+
page = PAGES[selection]
|
52 |
|
53 |
# --- NAVIGATION SETUP ---
|
54 |
#pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
|
55 |
+
#pg = st.navigation({"Home": [home_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
|
56 |
|
57 |
+
#pg.run()
|