Niharmahesh commited on
Commit
2d58071
·
verified ·
1 Parent(s): e274491

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -305,23 +305,14 @@ def display_about_page():
305
  <img src="https://content.linkedin.com/content/dam/me/business/en-us/amp/brand-site/v2/bg/LI-Logo.svg.original.svg" width="100">
306
  </a>
307
  """, unsafe_allow_html=True)
308
- def show_recommender_page():
309
- st.title("Recommender System")
310
-
311
- if 'authenticated' not in st.session_state:
312
- st.session_state.authenticated = False
313
-
314
- if not st.session_state.authenticated:
315
- password = st.text_input("Enter password to access the Recommender", type="password")
316
- if st.button("Submit"):
317
- if password == st.secrets["recommender_password"]:
318
- st.session_state.authenticated = True
319
- st.success("Access granted!")
320
- st.experimental_rerun() # Rerun to show the content
321
- else:
322
- st.error("Incorrect password")
323
  else:
324
- pages.recommender.show() # Call the show function from recommender.py
 
 
325
  def main():
326
  st.title("Job Easz")
327
 
@@ -333,7 +324,7 @@ def main():
333
 
334
  # Sidebar for navigation
335
  st.sidebar.title("Navigation")
336
- page = st.sidebar.radio("Go to", ["Dashboard", "Data Explorer","About"])
337
 
338
  if page == "Dashboard":
339
  display_dashboard(df)
@@ -343,6 +334,8 @@ def main():
343
  display_about_page()
344
  elif page=='Version Updates':
345
  st.swtich_page('pages/version_updates.py')
 
 
346
 
347
 
348
  if __name__ == "__main__":
 
305
  <img src="https://content.linkedin.com/content/dam/me/business/en-us/amp/brand-site/v2/bg/LI-Logo.svg.original.svg" width="100">
306
  </a>
307
  """, unsafe_allow_html=True)
308
+ def recommender():
309
+ user_password = st.text_input("Enter password:", type="password") [1, 3, 12]
310
+ if user_password == st.secrets["recommender_password"]:
311
+ st.swtich_page('pages/recommender.py')
 
 
 
 
 
 
 
 
 
 
 
312
  else:
313
+ st.error("Incorrect password") [1, 2, 4]
314
+
315
+
316
  def main():
317
  st.title("Job Easz")
318
 
 
324
 
325
  # Sidebar for navigation
326
  st.sidebar.title("Navigation")
327
+ page = st.sidebar.radio("Go to", ["Dashboard", "Data Explorer","About","recommender"])
328
 
329
  if page == "Dashboard":
330
  display_dashboard(df)
 
334
  display_about_page()
335
  elif page=='Version Updates':
336
  st.swtich_page('pages/version_updates.py')
337
+ elif page=="recommender":
338
+ recommender()
339
 
340
 
341
  if __name__ == "__main__":