arpy8 commited on
Commit
1fe4c16
1 Parent(s): 749bd1c

update sidebar

Browse files
__pycache__/config.cpython-311.pyc ADDED
Binary file (12.2 kB). View file
 
__pycache__/config.cpython-38.pyc ADDED
Binary file (12.1 kB). View file
 
__pycache__/model.cpython-311.pyc ADDED
Binary file (436 Bytes). View file
 
__pycache__/model.cpython-38.pyc ADDED
Binary file (347 Bytes). View file
 
config.py CHANGED
@@ -15,7 +15,6 @@ SIDEBAR_TEXT_1 = """
15
  <center><h1>Omdena Algeria & Bhopal Chapter</h1></center>
16
  """
17
  SIDEBAR_TEXT_2 = """
18
- <hr>
19
  <h3 class='sidebar_h1'>Disclaimer</h3>
20
  <h5 class='sidebar_h1'>The predictions provided by this system are for informational purposes only.</h5>
21
  <hr>
 
15
  <center><h1>Omdena Algeria & Bhopal Chapter</h1></center>
16
  """
17
  SIDEBAR_TEXT_2 = """
 
18
  <h3 class='sidebar_h1'>Disclaimer</h3>
19
  <h5 class='sidebar_h1'>The predictions provided by this system are for informational purposes only.</h5>
20
  <hr>
main.py CHANGED
@@ -1,11 +1,10 @@
1
  import base64
 
2
  import streamlit as st
3
 
4
  from config import *
5
  from model import model_page
6
- import pandas as pd
7
- import streamlit.components.v1 as components
8
-
9
 
10
  def set_page_background(png_file):
11
  @st.cache_data()
@@ -71,6 +70,13 @@ def overview_page():
71
 
72
 
73
  def main():
 
 
 
 
 
 
 
74
  st.set_page_config(
75
  page_title=f"Omdena Algeria & Bhopal Chapter",
76
  page_icon="💦",
@@ -80,10 +86,17 @@ def main():
80
  set_page_background(IMG_BACKGROUND)
81
  st.markdown(f"<style>{CSS}</style>", unsafe_allow_html=True)
82
 
83
- st.sidebar.image(IMG_BANNER2, width=280)
84
- st.sidebar.write(SIDEBAR_TEXT_1, unsafe_allow_html=True)
85
- selected_task = st.sidebar.selectbox("Please navigate through the different sections of our website from here", ["Home Page", "Project Overview", "Developed Model", "Contributors"], label_visibility="hidden")
86
- st.sidebar.write(SIDEBAR_TEXT_2, unsafe_allow_html=True)
 
 
 
 
 
 
 
87
 
88
  if selected_task == "Home Page":
89
  home_page()
 
1
  import base64
2
+ import pandas as pd
3
  import streamlit as st
4
 
5
  from config import *
6
  from model import model_page
7
+ from streamlit_option_menu import option_menu
 
 
8
 
9
  def set_page_background(png_file):
10
  @st.cache_data()
 
70
 
71
 
72
  def main():
73
+
74
+ css_style = {
75
+ "icon": {"color": "white"},
76
+ "nav-link": {"--hover-color": "grey"},
77
+ "nav-link-selected": {"background-color": "#232fac"},
78
+ }
79
+
80
  st.set_page_config(
81
  page_title=f"Omdena Algeria & Bhopal Chapter",
82
  page_icon="💦",
 
86
  set_page_background(IMG_BACKGROUND)
87
  st.markdown(f"<style>{CSS}</style>", unsafe_allow_html=True)
88
 
89
+ with st.sidebar:
90
+ st.image(IMG_BANNER2, width=280)
91
+ st.write(SIDEBAR_TEXT_1, unsafe_allow_html=True)
92
+ selected_task = option_menu(
93
+ menu_title=None,
94
+ options=["Home Page", "Project Overview", "Developed Model", "Contributors"],
95
+ icons=["house", "info-circle", "gear", "people"],
96
+ styles=css_style
97
+ )
98
+ st.write(SIDEBAR_TEXT_2, unsafe_allow_html=True)
99
+
100
 
101
  if selected_task == "Home Page":
102
  home_page()