Spaces:
Sleeping
Sleeping
File size: 1,879 Bytes
1e97cbb 09a1406 1e97cbb c626607 1e97cbb 7fce25d 1e97cbb c626607 1e97cbb c626607 1e97cbb 09a1406 c626607 1e97cbb c626607 1e97cbb c626607 1e97cbb 09a1406 1e97cbb c626607 1e97cbb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
import streamlit as st
import cv_question
import cv_short
import cv_analyzer_search
def clear_session_state():
"""Clear all session state variables."""
for key in list(st.session_state.keys()):
del st.session_state[key]
# initialize_session_state()
def main():
# Setup logger for app
# app_logger = setup_logger('app_logger', 'app.log')
# initialize_session_state()
# Sidebar #
st.sidebar.title("Navigation")
# app_logger.info("Sidebar navigation displayed")
# Add reset button in sidebar
if st.sidebar.button("Reset All Data"):
clear_session_state()
st.sidebar.success("All data has been reset!")
# app_logger.info("Session state reset")
# Navigation
page = st.sidebar.radio("Go to", ["CV Shortlisting", "Interview Questions","CV Analyser + JobSearch"])
# app_logger.info(f"Page selected: {page}")
try:
if page == "CV Shortlisting":
# app_logger.info("Navigating to CV Shortlisting")
cv_short.create_cv_shortlisting_page()
elif page == "Interview Questions":
# Check if CV shortlisting is complete
# if not st.session_state.analysis_complete:
# st.warning("Please complete the CV shortlisting process first.")
# app_logger.warning("Attempted to access Interview Questions without completing CV shortlisting")
# else:
# app_logger.info("Navigating to Interview Questions")
cv_question.create_interview_questions_page()
elif page == "CV Analyser + JobSearch":
cv_analyzer_search.Job_assistant()
except Exception as e:
# app_logger.error(f"Error occurred: {e}")
st.error(f"An error occurred: {e}")
if __name__ == "__main__":
main()
|