Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
989441e
1
Parent(s):
3a2fa17
Added comprehensive resume prompt.
Browse files
app.py
CHANGED
@@ -144,6 +144,103 @@ Please provide the following information in a concise and straightforward manner
|
|
144 |
|
145 |
return key_skills_and_accomplaishments
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
class Role:
|
148 |
def __init__(self, company_name, company_url, job_description, clean_job_description, job_title):
|
149 |
self.company_name = company_name
|
@@ -182,9 +279,9 @@ def process_job_description(company_name, company_url, job_description, resume):
|
|
182 |
clean_job_description = smol_lm_jd_process(job_description, system_prompt_summary)
|
183 |
|
184 |
system_prompt_get_job_title = "Extract only the job title from the following job description. Respond with nothing but the job title—no labels, no comments, no summaries, no locations, or extra text. If the title is unusually long or nonstandard, replace it with the most common, concise, and widely recognized job title for the role. Your answer must be 7 words or fewer, with no punctuation, newlines, or additional information. Acceptable examples may look like: 'Systems Analyst', 'marketing director', 'patient advocate III', ..."
|
185 |
-
|
186 |
|
187 |
-
role = Role(company_name, company_url, job_description, clean_job_description,
|
188 |
|
189 |
# Step 4: Company Research
|
190 |
searches = {
|
@@ -226,7 +323,7 @@ def process_job_description(company_name, company_url, job_description, resume):
|
|
226 |
job_and_company_info = {
|
227 |
"Company Name": company_name,
|
228 |
"Company URL": company_url,
|
229 |
-
"job_title":
|
230 |
"Original Job Description": job_description,
|
231 |
"Role Requirements": role_requirements,
|
232 |
"Clean Job Description": clean_job_description,
|
@@ -250,6 +347,9 @@ def process_job_description(company_name, company_url, job_description, resume):
|
|
250 |
def generate_key_accomplishments_and_skills_prompt(job_and_company_info, resume):
|
251 |
return get_key_accomplishments_prompt(job_and_company_info, resume)
|
252 |
|
|
|
|
|
|
|
253 |
# Create the Gradio app
|
254 |
demo = gr.Blocks()
|
255 |
|
@@ -289,13 +389,21 @@ with demo:
|
|
289 |
gr.Markdown("## Key Accomplishments and Skills")
|
290 |
key_accomplishments_and_skills_result = gr.TextArea(label="Paste Key Accomplishments and Skills Result")
|
291 |
key_accomplishments_and_skills_result_output = gr.TextArea(label="Submitted Key Accomplishments and Skills Result", interactive=False)
|
|
|
292 |
|
293 |
gr.Button("Submit Key Accomplishments and Skills Result").click(
|
294 |
lambda x: x,
|
295 |
inputs=[key_accomplishments_and_skills_result],
|
296 |
outputs=key_accomplishments_and_skills_result_output
|
|
|
|
|
|
|
|
|
297 |
)
|
298 |
|
|
|
|
|
|
|
299 |
if __name__ == "__main__":
|
300 |
demo.launch()
|
301 |
|
|
|
144 |
|
145 |
return key_skills_and_accomplaishments
|
146 |
|
147 |
+
def get_resume_prompt(job_and_company_info, resume, gap_assessment_result, key_accomplishments_and_skills_result):
|
148 |
+
resume_prompt = f"""
|
149 |
+
|
150 |
+
# The applicant is applying for this role:
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
Company Name: {job_and_company_info['Company Name']}
|
156 |
+
Company URL: {job_and_company_info['Company URL']}
|
157 |
+
Job Title: {job_and_company_info['job_title']}
|
158 |
+
Role Requirements: {job_and_company_info['Role Requirements']}
|
159 |
+
Clean Job Description: {job_and_company_info['Clean Job Description']}
|
160 |
+
|
161 |
+
# Additional Information about the company to consider and leverage for strength and company - specificity:
|
162 |
+
|
163 |
+
Company Values: {job_and_company_info['Company Research']['Company Values Summary']}
|
164 |
+
Corporate Culture: {job_and_company_info['Company Research']['Corporate Culture Summary']}
|
165 |
+
Leadership Team and Possible Key Opinion Leaders: {job_and_company_info['Company Research']['Leadership Team Summary']}
|
166 |
+
Recent Company News: {job_and_company_info['Company Research']['Recent News Summary']}
|
167 |
+
Company Competitive Advantages: {job_and_company_info['Company Research']['Competitive Advantages Summary']}
|
168 |
+
|
169 |
+
## This is the candidate's resume:
|
170 |
+
|
171 |
+
{resume}
|
172 |
+
|
173 |
+
## Consider this gap analysis
|
174 |
+
|
175 |
+
{gap_assessment_result}
|
176 |
+
|
177 |
+
|
178 |
+
## Also be sure to include these key accomplishments and skills:
|
179 |
+
|
180 |
+
{key_accomplishments_and_skills_result}
|
181 |
+
|
182 |
+
Please follow these best practices to make the resume optimized for the ATS visibility to the extent realistic and truthful.\n\n
|
183 |
+
|
184 |
+
1. **Replace Non-Standard Formatting**
|
185 |
+
- Convert tables, columns, or graphical elements in the resume text into plain-text lists using dashes or asterisks.
|
186 |
+
- Replace non-traditional bullet points with standard symbols (e.g., hyphens or circles).
|
187 |
+
|
188 |
+
2. **Standardize Section Headings**
|
189 |
+
- Rename unconventional headings (e.g., "Career Highlights" → "Work Experience").
|
190 |
+
- Ensure headings match ATS-recognized categories: "Work Experience," "Education," "Skills," etc.
|
191 |
+
|
192 |
+
3. **Normalize Date Formats**
|
193 |
+
- Convert all dates to a consistent format (e.g., "Month YYYY" or "MM/YYYY") throughout the resume.
|
194 |
+
|
195 |
+
4. **Integrate Job-Specific Keywords**
|
196 |
+
- Extract exact keywords/phrases from the job description (especially verbs and skills) and insert them contextually into work experience bullet points.
|
197 |
+
- Prioritize keywords in the "Skills" section and within achievement-oriented statements (e.g., "Spearheaded [keyword] project resulting in [metric]").
|
198 |
+
|
199 |
+
5. **Spell Out Acronyms**
|
200 |
+
- Identify and expand acronyms (e.g., "CRM" → "Customer Relationship Management (CRM)") unless the job description uses the abbreviation verbatim.
|
201 |
+
|
202 |
+
6. **Quantify Achievements**
|
203 |
+
- Add metrics to vague statements in work experience (e.g., "Increased sales" → "Increased sales by 25% over 6 months").
|
204 |
+
- Prioritize percentages, time frames, and numerical outcomes for clarity and ATS scoring.
|
205 |
+
|
206 |
+
7. **Tailor the Professional Summary**
|
207 |
+
- Rewrite the summary to mirror the job title, key qualifications, and industry-specific terms from the job description.
|
208 |
+
- Example: "Seeking a [Job Title] role at [Company] to leverage [X years] in [relevant skill] and [X%] success in [metric]."
|
209 |
+
|
210 |
+
8. **Optimize Skills Section**
|
211 |
+
- List skills as a comma-separated list (no bullets) using the exact terminology from the job description.
|
212 |
+
- Include both hard skills (e.g., "Python," "Google Analytics") and soft skills (e.g., "Team Leadership") if mentioned in the job post.
|
213 |
+
|
214 |
+
9. **Remove Hidden Text or Formatting Artifacts**
|
215 |
+
- Eliminate invisible text (e.g., white font keywords) or special characters (e.g., symbols in headers) that may confuse ATS parsing.
|
216 |
+
|
217 |
+
10. **Contextualize Keywords**
|
218 |
+
- Ensure keywords appear in context (e.g., "Managed [keyword] project" vs. a standalone keyword in a skills list).
|
219 |
+
|
220 |
+
11. **Active Voice Conversion**
|
221 |
+
- Replace passive language with active verbs (e.g., "Responsible for managing a team" → "Managed a team of X members").
|
222 |
+
|
223 |
+
12. **Proofread for ATS-Critical Errors**
|
224 |
+
- Correct typos, misspellings, and inconsistent punctuation (especially in key fields like name, job titles, and skills).
|
225 |
+
- Remove accents or special characters from the name and contact details.
|
226 |
+
|
227 |
+
13. **ATS Simulation Feedback Loop**
|
228 |
+
- Simulate ATS parsing by checking for missing keywords or formatting issues (e.g., fragmented sections caused by tables).
|
229 |
+
|
230 |
+
14. **Customize for Company Culture**
|
231 |
+
- Analyze company metadata (e.g., industry, values) and align resume language with their priorities (e.g., "Agile methodology" for tech firms).
|
232 |
+
|
233 |
+
15. **Achievement Over Responsibility**
|
234 |
+
- Replace generic duties with achievement-focused statements (e.g., "Handled customer service" → "Resolved 50+ customer inquiries daily, improving satisfaction by 30%").
|
235 |
+
|
236 |
+
16. **Keyword Density Balance**
|
237 |
+
- Ensure keywords are distributed naturally across sections without overuse (e.g., 2-3 mentions of a critical keyword in work experience vs. 10 in a skills list)."
|
238 |
+
- Instruct the user to paste this into a suitable word processor and use the result to build a resume. Save it in word, then in PDF (JaneDoe_Resume_CompanyName.pdf). Submit the PDF.
|
239 |
+
|
240 |
+
|
241 |
+
"""
|
242 |
+
return resume_prompt
|
243 |
+
|
244 |
class Role:
|
245 |
def __init__(self, company_name, company_url, job_description, clean_job_description, job_title):
|
246 |
self.company_name = company_name
|
|
|
279 |
clean_job_description = smol_lm_jd_process(job_description, system_prompt_summary)
|
280 |
|
281 |
system_prompt_get_job_title = "Extract only the job title from the following job description. Respond with nothing but the job title—no labels, no comments, no summaries, no locations, or extra text. If the title is unusually long or nonstandard, replace it with the most common, concise, and widely recognized job title for the role. Your answer must be 7 words or fewer, with no punctuation, newlines, or additional information. Acceptable examples may look like: 'Systems Analyst', 'marketing director', 'patient advocate III', ..."
|
282 |
+
extracted_job_title = smol_lm_jd_process(job_description, system_prompt_get_job_title, max_new_tokens=150)[:50].lower().replace("job","").replace("title","").replace("\n","")
|
283 |
|
284 |
+
role = Role(company_name, company_url, job_description, clean_job_description, extracted_job_title)
|
285 |
|
286 |
# Step 4: Company Research
|
287 |
searches = {
|
|
|
323 |
job_and_company_info = {
|
324 |
"Company Name": company_name,
|
325 |
"Company URL": company_url,
|
326 |
+
"job_title": extracted_job_title,
|
327 |
"Original Job Description": job_description,
|
328 |
"Role Requirements": role_requirements,
|
329 |
"Clean Job Description": clean_job_description,
|
|
|
347 |
def generate_key_accomplishments_and_skills_prompt(job_and_company_info, resume):
|
348 |
return get_key_accomplishments_prompt(job_and_company_info, resume)
|
349 |
|
350 |
+
def generate_resume_prompt(job_and_company_info, resume, gap_assessment_result_output, key_accomplishments_and_skills_result_output):
|
351 |
+
return get_resume_prompt(job_and_company_info, resume, gap_assessment_result_output, key_accomplishments_and_skills_result_output)
|
352 |
+
|
353 |
# Create the Gradio app
|
354 |
demo = gr.Blocks()
|
355 |
|
|
|
389 |
gr.Markdown("## Key Accomplishments and Skills")
|
390 |
key_accomplishments_and_skills_result = gr.TextArea(label="Paste Key Accomplishments and Skills Result")
|
391 |
key_accomplishments_and_skills_result_output = gr.TextArea(label="Submitted Key Accomplishments and Skills Result", interactive=False)
|
392 |
+
resume_prompt_output = gr.TextArea(label="Resume Prompt")
|
393 |
|
394 |
gr.Button("Submit Key Accomplishments and Skills Result").click(
|
395 |
lambda x: x,
|
396 |
inputs=[key_accomplishments_and_skills_result],
|
397 |
outputs=key_accomplishments_and_skills_result_output
|
398 |
+
).then(
|
399 |
+
generate_resume_prompt,
|
400 |
+
inputs=[job_and_company_info_output, resume, gap_assessment_result_output, key_accomplishments_and_skills_result_output],
|
401 |
+
outputs=resume_prompt_output
|
402 |
)
|
403 |
|
404 |
+
gr.Markdown("## Resume Prompt")
|
405 |
+
gr.Markdown("Copy the following prompt into a suitable SOTA AI assistant like LLama 4 maveric on poe.com, Deepseek R1-1776 on poe.com, Qwen/Qwen3-235B-A22B on huggingface chat, or chatGPT. Save the result as a Word document, then export it to PDF. Submit the PDF.")
|
406 |
+
|
407 |
if __name__ == "__main__":
|
408 |
demo.launch()
|
409 |
|