Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ import math
|
|
11 |
import re
|
12 |
import pyarrow.csv as csv
|
13 |
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
|
14 |
# Set page config for a wider layout and custom theme
|
15 |
st.set_page_config(layout="wide", page_title="Job Listings Dashboard")
|
16 |
|
@@ -304,6 +305,23 @@ def display_about_page():
|
|
304 |
<img src="https://content.linkedin.com/content/dam/me/business/en-us/amp/brand-site/v2/bg/LI-Logo.svg.original.svg" width="100">
|
305 |
</a>
|
306 |
""", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
def main():
|
308 |
st.title("Job Easz")
|
309 |
|
@@ -315,7 +333,7 @@ def main():
|
|
315 |
|
316 |
# Sidebar for navigation
|
317 |
st.sidebar.title("Navigation")
|
318 |
-
page = st.sidebar.radio("Go to", ["Dashboard", "Data Explorer","About"])
|
319 |
|
320 |
if page == "Dashboard":
|
321 |
display_dashboard(df)
|
@@ -325,6 +343,9 @@ def main():
|
|
325 |
display_about_page()
|
326 |
elif page=='Version Updates':
|
327 |
st.swtich_page('pages/version_updates.py')
|
|
|
|
|
|
|
328 |
|
329 |
if __name__ == "__main__":
|
330 |
main()
|
|
|
11 |
import re
|
12 |
import pyarrow.csv as csv
|
13 |
from concurrent.futures import ThreadPoolExecutor, as_completed
|
14 |
+
import pages.recommender
|
15 |
# Set page config for a wider layout and custom theme
|
16 |
st.set_page_config(layout="wide", page_title="Job Listings Dashboard")
|
17 |
|
|
|
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 |
|
334 |
# Sidebar for navigation
|
335 |
st.sidebar.title("Navigation")
|
336 |
+
page = st.sidebar.radio("Go to", ["Dashboard", "Data Explorer","About","Recommender"])
|
337 |
|
338 |
if page == "Dashboard":
|
339 |
display_dashboard(df)
|
|
|
343 |
display_about_page()
|
344 |
elif page=='Version Updates':
|
345 |
st.swtich_page('pages/version_updates.py')
|
346 |
+
elif page == 'Recommender':
|
347 |
+
# Load the Recommender page and ask for password
|
348 |
+
show_recommender_page()
|
349 |
|
350 |
if __name__ == "__main__":
|
351 |
main()
|