Anushkabhat9 commited on
Commit
d014ab9
·
verified ·
1 Parent(s): 98a51c1

Upload resume_generation_gemini_pro.py

Browse files
Files changed (1) hide show
  1. resume_generation_gemini_pro.py +3 -2
resume_generation_gemini_pro.py CHANGED
@@ -30,6 +30,7 @@ Original file is located at
30
  # !pip install --upgrade google-generativeai -qq
31
 
32
  import docx2txt
 
33
  def extract_text(file_path):
34
  if file_path.endswith(".docx"):
35
  # Extract text from DOCX file
@@ -139,8 +140,8 @@ def Gemini_pro_main(current_resume,job_description):
139
  st.header('Resume Tailoring')
140
 
141
  # Load the resume and job description from Google Drive
142
- resume_text = read_docx(current_resume)
143
- job_description = read_docx(job_description)
144
 
145
  # Tailor resume based on job description
146
  tailored_resume = tailor_resume(resume_text, job_description)
 
30
  # !pip install --upgrade google-generativeai -qq
31
 
32
  import docx2txt
33
+ import PyPDF2
34
  def extract_text(file_path):
35
  if file_path.endswith(".docx"):
36
  # Extract text from DOCX file
 
140
  st.header('Resume Tailoring')
141
 
142
  # Load the resume and job description from Google Drive
143
+ resume_text = extract_text(current_resume)
144
+ job_description = extract_text(job_description)
145
 
146
  # Tailor resume based on job description
147
  tailored_resume = tailor_resume(resume_text, job_description)