Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -70,10 +70,10 @@ def analyze_resume(job_desc, resume_text, analyze_with_jd):
|
|
70 |
result = summarizer(user_prompt, max_new_tokens=512, do_sample=True)[0]
|
71 |
response_text = result.get('generated_text', result.get('summary_text', str(result))).strip()
|
72 |
if analyze_with_jd and job_desc:
|
73 |
-
matched,
|
74 |
highlighted_resume = highlight_keywords(resume_text, matched)
|
75 |
llm_missing_keywords = extract_missing_keywords_with_llm(job_desc, resume_text)
|
76 |
-
return f"### π Resume with Highlighted Matches\n\n{highlighted_resume}\n\n---\n**β
Matched Keywords
|
77 |
return response_text
|
78 |
except Exception as e:
|
79 |
return f"β Error: {str(e)}"
|
|
|
70 |
result = summarizer(user_prompt, max_new_tokens=512, do_sample=True)[0]
|
71 |
response_text = result.get('generated_text', result.get('summary_text', str(result))).strip()
|
72 |
if analyze_with_jd and job_desc:
|
73 |
+
matched, missing = compare_keywords(resume_text, job_desc)
|
74 |
highlighted_resume = highlight_keywords(resume_text, matched)
|
75 |
llm_missing_keywords = extract_missing_keywords_with_llm(job_desc, resume_text)
|
76 |
+
return f"### π Resume with Highlighted Matches\n\n{highlighted_resume}\n\n---\n**β
Matched Keywords (Basic Comparison):**\n{', '.join(sorted(matched)) or 'None'}\n\n**β Missing Keywords (Basic Comparison):**\n{', '.join(sorted(missing)) or 'None'}\n\n**π€ LLM-Inferred Missing Keywords:**\n{llm_missing_keywords}\n\n---\n{response_text}"
|
77 |
return response_text
|
78 |
except Exception as e:
|
79 |
return f"β Error: {str(e)}"
|