pktpaulie commited on
Commit
4a494c9
·
verified ·
1 Parent(s): 93f871f

Update function to return tailored resume

Browse files
Files changed (1) hide show
  1. resume_generation_gemini_pro.py +24 -2
resume_generation_gemini_pro.py CHANGED
@@ -135,8 +135,8 @@ Please generate a resume that:
135
  else:
136
  return "Failed to generate resume text."
137
 
138
- # Main function for Streamlit app
139
- def Gemini_pro_main(current_resume,job_description):
140
  st.header('Resume Tailoring')
141
 
142
  # Load the resume and job description from Google Drive
@@ -155,6 +155,28 @@ def Gemini_pro_main(current_resume,job_description):
155
  save_resume_to_docx(tailored_resume, file_path)
156
  st.success(f"Tailored resume saved to {file_path}")
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  # if __name__ == '__main__':
159
  # main()
160
 
 
135
  else:
136
  return "Failed to generate resume text."
137
 
138
+ #Entry function for the model
139
+ def generate_gemini(current_resume,job_description):
140
  st.header('Resume Tailoring')
141
 
142
  # Load the resume and job description from Google Drive
 
155
  save_resume_to_docx(tailored_resume, file_path)
156
  st.success(f"Tailored resume saved to {file_path}")
157
 
158
+ return tailored_resume
159
+
160
+ # Main function for Streamlit app
161
+ # def Gemini_pro_main(current_resume,job_description):
162
+ # st.header('Resume Tailoring')
163
+
164
+ # # Load the resume and job description from Google Drive
165
+ # resume_text = extract_text(current_resume)
166
+ # job_description = extract_text(job_description)
167
+
168
+ # # Tailor resume based on job description
169
+ # tailored_resume = tailor_resume(resume_text, job_description)
170
+ # st.write("**Tailored Resume:**")
171
+ # st.write(tailored_resume)
172
+ # print(tailored_resume)
173
+
174
+ # # Save the tailored resume to a .docx file
175
+ # if tailored_resume:
176
+ # file_path = f"Tailored_Resume_{datetime.now().strftime('%Y%m%d_%H%M%S')}.docx"
177
+ # save_resume_to_docx(tailored_resume, file_path)
178
+ # st.success(f"Tailored resume saved to {file_path}")
179
+
180
  # if __name__ == '__main__':
181
  # main()
182