ShehryarAppsWork commited on
Commit
98323b0
·
verified ·
1 Parent(s): 65c2736

Update apphome.py

Browse files
Files changed (1) hide show
  1. apphome.py +86 -86
apphome.py CHANGED
@@ -1,87 +1,87 @@
1
- import streamlit as st
2
- import streamlit.components.v1 as components
3
- from streamlit_navigation_bar import st_navbar
4
- from streamlit_option_menu import option_menu
5
- import time
6
- import asyncio
7
- from styles import *
8
-
9
- ########################################################
10
- from NoNavPages.Home import home
11
-
12
- from IntroBars.Style7IntroBar import introBar7
13
- ########################################################
14
- #App goes here...S
15
-
16
-
17
- def apphome():
18
- ########################## Do not Alter this Code
19
- st.set_page_config(layout = "wide",initial_sidebar_state="collapsed",page_title = "AI Compliance Platform" ,page_icon = "Logo/LOGO1.svg")
20
- st.markdown(wholepage ,unsafe_allow_html=True)
21
- st.markdown(reduceTop_style ,unsafe_allow_html=True)
22
- st.markdown("""
23
- <script>
24
- const email = localStorage.getItem("user_email");
25
- if (email) {
26
- const url = new URL(window.location);
27
- if (!url.searchParams.get("email")) {
28
- url.searchParams.set("email", email);
29
- window.location.replace(url);
30
- }
31
- }
32
- </script>
33
- """, unsafe_allow_html=True)
34
- email_from_browser = st.query_params.get("email", [None])[0]
35
- if email_from_browser:
36
- #get vectdb of user and delete it
37
- #remove email from local storage
38
- st.markdown("""
39
- <script>
40
- localStorage.removeItem("user_email");
41
- </script>
42
- """, unsafe_allow_html=True)
43
- pass
44
-
45
- ##########################
46
-
47
- #Style 1
48
- #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About','Contact Us'],styles={"container":{"background-color":"transparent"}},icons=['house', 'cloud-upload', "list-task", 'gear'], menu_icon=None, default_index=0, orientation="horizontal")
49
-
50
- #Style 2
51
- #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About','Contact Us'],icons=['house', 'cloud-upload', "list-task", 'gear'], menu_icon=None, default_index=0, orientation="horizontal")
52
-
53
- #Style 3: when using style 3 reduceTop_style padding 2rem for top
54
- #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About' ,'Contact Us'],styles={"container":{"background-color":"transparent"}},icons=['house', 'cloud-upload', "list-task"], menu_icon=None, default_index=0, orientation="horizontal")
55
- #st.markdown(navstyle3_style ,unsafe_allow_html=True)
56
-
57
- #style 4:
58
- #introBar4() #reduceTop_style padding 0.15rem/0rem for top
59
-
60
- #style 5:
61
- #introBar5() #reduceTop_style padding 0.15rem/0rem for top
62
-
63
- #style 6:
64
- #introBar6() #reduceTop_style padding 0.15rem/0rem for top
65
-
66
- #style 7:
67
- introBar7() #reduceTop_style padding 0.15rem/0rem for top
68
-
69
-
70
-
71
- #await home()
72
- home()
73
-
74
-
75
- # Marginleft, AppCol, Marginright= st.columns([0.05,0.9,0.05])
76
- # #bordered page content
77
- # with AppCol:
78
- # st.write("<h1>HTML Headings</h1>",unsafe_allow_html=True)
79
- # st.markdown("# Markdown Heading")
80
- # st.popover(label="This is some label")
81
-
82
-
83
- # if __name__ == "__main__":
84
- # asyncio.run(main())
85
-
86
-
87
  apphome()
 
1
+ import streamlit as st
2
+ import streamlit.components.v1 as components
3
+ from streamlit_navigation_bar import st_navbar
4
+ from streamlit_option_menu import option_menu
5
+ import time
6
+ import asyncio
7
+ from styles import *
8
+
9
+ ########################################################
10
+ from NoNavPages.Home import home
11
+
12
+ from IntroBars.Style7IntroBar import introBar7
13
+ ########################################################
14
+ #App goes here...S
15
+
16
+
17
+ def apphome():
18
+ ########################## Do not Alter this Code
19
+ st.set_page_config(layout = "wide",initial_sidebar_state="collapsed",page_title = "AI Compliance Platform" ,page_icon = "LOGO/LOGO1.svg")
20
+ st.markdown(wholepage ,unsafe_allow_html=True)
21
+ st.markdown(reduceTop_style ,unsafe_allow_html=True)
22
+ st.markdown("""
23
+ <script>
24
+ const email = localStorage.getItem("user_email");
25
+ if (email) {
26
+ const url = new URL(window.location);
27
+ if (!url.searchParams.get("email")) {
28
+ url.searchParams.set("email", email);
29
+ window.location.replace(url);
30
+ }
31
+ }
32
+ </script>
33
+ """, unsafe_allow_html=True)
34
+ email_from_browser = st.query_params.get("email", [None])[0]
35
+ if email_from_browser:
36
+ #get vectdb of user and delete it
37
+ #remove email from local storage
38
+ st.markdown("""
39
+ <script>
40
+ localStorage.removeItem("user_email");
41
+ </script>
42
+ """, unsafe_allow_html=True)
43
+ pass
44
+
45
+ ##########################
46
+
47
+ #Style 1
48
+ #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About','Contact Us'],styles={"container":{"background-color":"transparent"}},icons=['house', 'cloud-upload', "list-task", 'gear'], menu_icon=None, default_index=0, orientation="horizontal")
49
+
50
+ #Style 2
51
+ #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About','Contact Us'],icons=['house', 'cloud-upload', "list-task", 'gear'], menu_icon=None, default_index=0, orientation="horizontal")
52
+
53
+ #Style 3: when using style 3 reduceTop_style padding 2rem for top
54
+ #selected = option_menu(None, ["Home", "GRCT", "Docs", 'About' ,'Contact Us'],styles={"container":{"background-color":"transparent"}},icons=['house', 'cloud-upload', "list-task"], menu_icon=None, default_index=0, orientation="horizontal")
55
+ #st.markdown(navstyle3_style ,unsafe_allow_html=True)
56
+
57
+ #style 4:
58
+ #introBar4() #reduceTop_style padding 0.15rem/0rem for top
59
+
60
+ #style 5:
61
+ #introBar5() #reduceTop_style padding 0.15rem/0rem for top
62
+
63
+ #style 6:
64
+ #introBar6() #reduceTop_style padding 0.15rem/0rem for top
65
+
66
+ #style 7:
67
+ introBar7() #reduceTop_style padding 0.15rem/0rem for top
68
+
69
+
70
+
71
+ #await home()
72
+ home()
73
+
74
+
75
+ # Marginleft, AppCol, Marginright= st.columns([0.05,0.9,0.05])
76
+ # #bordered page content
77
+ # with AppCol:
78
+ # st.write("<h1>HTML Headings</h1>",unsafe_allow_html=True)
79
+ # st.markdown("# Markdown Heading")
80
+ # st.popover(label="This is some label")
81
+
82
+
83
+ # if __name__ == "__main__":
84
+ # asyncio.run(main())
85
+
86
+
87
  apphome()