root commited on
Commit
309041b
Β·
1 Parent(s): f82b542
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -77,9 +77,12 @@ if 'resume_texts' not in st.session_state:
77
  st.session_state.resume_texts = []
78
  if 'file_names' not in st.session_state:
79
  st.session_state.file_names = []
80
-
81
  if 'current_job_description' not in st.session_state:
82
  st.session_state.current_job_description = ""
 
 
 
 
83
  # No need for Qwen3-14B model since we're not generating explanations
84
 
85
  # Separate smaller model for intent analysis
@@ -589,7 +592,8 @@ st.header("πŸ“ Step 1: Enter Job Description")
589
  job_description = st.text_area(
590
  "Enter the complete job description or requirements:",
591
  height=150,
592
- placeholder="Paste the job description here, including required skills, experience, and qualifications..."
 
593
  )
594
 
595
  # Resume Input Options
@@ -606,6 +610,8 @@ if st.session_state.resume_texts:
606
  st.session_state.file_names = []
607
  st.session_state.results = []
608
  st.session_state.current_job_description = ""
 
 
609
  st.rerun()
610
 
611
  input_method = st.radio(
@@ -618,7 +624,8 @@ if input_method == "πŸ“ Upload Files":
618
  "Upload resume files",
619
  type=["pdf", "docx", "txt"],
620
  accept_multiple_files=True,
621
- help="Supported formats: PDF, DOCX, TXT"
 
622
  )
623
 
624
  if uploaded_files:
@@ -899,6 +906,8 @@ with col1:
899
  st.session_state.file_names = []
900
  st.session_state.results = []
901
  st.session_state.current_job_description = ""
 
 
902
  st.success("βœ… Resumes cleared!")
903
  st.rerun()
904
 
@@ -912,6 +921,8 @@ with col2:
912
  if torch.cuda.is_available():
913
  torch.cuda.empty_cache()
914
  gc.collect()
 
 
915
  st.success("βœ… Everything cleared!")
916
  st.rerun()
917
 
 
77
  st.session_state.resume_texts = []
78
  if 'file_names' not in st.session_state:
79
  st.session_state.file_names = []
 
80
  if 'current_job_description' not in st.session_state:
81
  st.session_state.current_job_description = ""
82
+ if 'file_uploader_key' not in st.session_state:
83
+ st.session_state.file_uploader_key = 0
84
+ if 'job_description_key' not in st.session_state:
85
+ st.session_state.job_description_key = 1000
86
  # No need for Qwen3-14B model since we're not generating explanations
87
 
88
  # Separate smaller model for intent analysis
 
592
  job_description = st.text_area(
593
  "Enter the complete job description or requirements:",
594
  height=150,
595
+ placeholder="Paste the job description here, including required skills, experience, and qualifications...",
596
+ key=st.session_state.job_description_key
597
  )
598
 
599
  # Resume Input Options
 
610
  st.session_state.file_names = []
611
  st.session_state.results = []
612
  st.session_state.current_job_description = ""
613
+ st.session_state.file_uploader_key += 1
614
+ st.session_state.job_description_key += 1
615
  st.rerun()
616
 
617
  input_method = st.radio(
 
624
  "Upload resume files",
625
  type=["pdf", "docx", "txt"],
626
  accept_multiple_files=True,
627
+ help="Supported formats: PDF, DOCX, TXT",
628
+ key=st.session_state.file_uploader_key
629
  )
630
 
631
  if uploaded_files:
 
906
  st.session_state.file_names = []
907
  st.session_state.results = []
908
  st.session_state.current_job_description = ""
909
+ st.session_state.file_uploader_key += 1
910
+ st.session_state.job_description_key += 1
911
  st.success("βœ… Resumes cleared!")
912
  st.rerun()
913
 
 
921
  if torch.cuda.is_available():
922
  torch.cuda.empty_cache()
923
  gc.collect()
924
+ st.session_state.file_uploader_key += 1
925
+ st.session_state.job_description_key += 1
926
  st.success("βœ… Everything cleared!")
927
  st.rerun()
928