rsm-roguchi commited on
Commit
504c48d
Β·
1 Parent(s): 6806a2b
Files changed (1) hide show
  1. server/candidate_profile.py +5 -7
server/candidate_profile.py CHANGED
@@ -9,10 +9,10 @@ import html
9
  import markdown
10
 
11
 
12
- RESUME_DIR = "/tmp/data/resumes/"
13
 
14
- def extract_text_from_pdf(filename):
15
- path = os.path.join(RESUME_DIR, filename) + '.pdf'
16
  if not os.path.exists(path):
17
  print(f"❌ Resume not found: {path}")
18
  return None, None
@@ -166,9 +166,7 @@ def server(input, output, session):
166
 
167
  filename = input.candidate_dropdown_for_doc()
168
  job_id = input.job_dropdown_for_doc() # πŸ”§ ADD THIS LINE
169
- use_gemini = input.show_gemini()
170
-
171
- print(filename)
172
 
173
  if not filename or not job_id:
174
  return "Please select both resume and job ID."
@@ -205,7 +203,7 @@ def server(input, output, session):
205
  )
206
 
207
  # βœ… Run full pipeline
208
- resume_text, resume_path = extract_text_from_pdf(filename)
209
  if not resume_text:
210
  return "Failed to extract resume."
211
 
 
9
  import markdown
10
 
11
 
12
+ RESUME_DIR = "/tmp/data/"
13
 
14
+ def extract_text_from_pdf(filename, job_id):
15
+ path = os.path.join(RESUME_DIR, job_id, 'resumes', filename) + '.pdf'
16
  if not os.path.exists(path):
17
  print(f"❌ Resume not found: {path}")
18
  return None, None
 
166
 
167
  filename = input.candidate_dropdown_for_doc()
168
  job_id = input.job_dropdown_for_doc() # πŸ”§ ADD THIS LINE
169
+ use_gemini = input.show_gemini()
 
 
170
 
171
  if not filename or not job_id:
172
  return "Please select both resume and job ID."
 
203
  )
204
 
205
  # βœ… Run full pipeline
206
+ resume_text, resume_path = extract_text_from_pdf(filename, job_id)
207
  if not resume_text:
208
  return "Failed to extract resume."
209