Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,43 +83,9 @@ def get_summary(text: str, role: str) -> str:
|
|
| 83 |
return text
|
| 84 |
|
| 85 |
if role == 'CV':
|
| 86 |
-
prompt_instruction = ""
|
| 87 |
-
Extract only the essential, job-relevant information from the following CV.
|
| 88 |
-
Remove filler content, generic statements, and irrelevant personal details.
|
| 89 |
-
Give me a simlified CV that doesn not have unnecessary information that can be used by a neural network to match against a job description.
|
| 90 |
-
|
| 91 |
-
Instructions:
|
| 92 |
-
|
| 93 |
-
Analyse the CV and identify information that strongly influences job-fit.
|
| 94 |
-
|
| 95 |
-
Discard unnecessary/noisy information such as: personal bio fluff, unrelated hobbies, generic soft-skill lists, verbose work summaries,
|
| 96 |
-
long paragraphs, outdated jobs, or irrelevant education.
|
| 97 |
-
|
| 98 |
-
Keep only concrete, measurable, and relevant data points.
|
| 99 |
-
|
| 100 |
-
Focus on extracting:
|
| 101 |
-
|
| 102 |
-
- Job titles
|
| 103 |
-
- Dates relevant to each job
|
| 104 |
-
- Relevant industries
|
| 105 |
-
- Relevant tools/technologies
|
| 106 |
-
- Impact metrics (%, $, productivity, time saved, etc.)
|
| 107 |
-
- Seniority indicators
|
| 108 |
-
- Management experience
|
| 109 |
-
- Certifications important for the target role
|
| 110 |
-
- Any achievements that demonstrate job-fit
|
| 111 |
-
|
| 112 |
-
Do NOT include:
|
| 113 |
-
|
| 114 |
-
- Hobbies
|
| 115 |
-
- Personal details (address, age, nationality)
|
| 116 |
-
- Overly detailed job responsibilities
|
| 117 |
-
"""
|
| 118 |
elif role == 'JD':
|
| 119 |
-
prompt_instruction = ""
|
| 120 |
-
Extract the core required skills, experience levels, technological stack, and main responsibilities for this role.
|
| 121 |
-
Exclude recruiting boilerplate or company mission statements.
|
| 122 |
-
"""
|
| 123 |
else:
|
| 124 |
prompt_instruction = "Summarize the key contents."
|
| 125 |
|
|
@@ -157,9 +123,9 @@ def get_human_readable_summary(json_data: dict) -> str:
|
|
| 157 |
prompt = f"""
|
| 158 |
You are an expert technical writer. Take the following structured JSON data
|
| 159 |
representing a CV-Job Description match analysis and convert it into a smooth,
|
| 160 |
-
professional, human-readable summary. Focus on the key findings in
|
| 161 |
-
'matching_analysis' and 'description',
|
| 162 |
-
|
| 163 |
|
| 164 |
JSON Data:
|
| 165 |
---
|
|
|
|
| 83 |
return text
|
| 84 |
|
| 85 |
if role == 'CV':
|
| 86 |
+
prompt_instruction = "Extract the key professional skills, technologies, job roles, and quantifiable achievements. Exclude personal contact information, filler text, or overly verbose descriptions. Keep the summary under 300 words."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
elif role == 'JD':
|
| 88 |
+
prompt_instruction = "Extract the core required skills, experience levels, technological stack, and main responsibilities for this role. Exclude recruiting boilerplate or company mission statements. Keep the summary under 200 words."
|
|
|
|
|
|
|
|
|
|
| 89 |
else:
|
| 90 |
prompt_instruction = "Summarize the key contents."
|
| 91 |
|
|
|
|
| 123 |
prompt = f"""
|
| 124 |
You are an expert technical writer. Take the following structured JSON data
|
| 125 |
representing a CV-Job Description match analysis and convert it into a smooth,
|
| 126 |
+
professional, human-readable summary. Focus on the score, key findings in
|
| 127 |
+
'matching_analysis' and 'description', and format the 'recommendation'
|
| 128 |
+
steps clearly at the end. Do not output any JSON or code formatting.
|
| 129 |
|
| 130 |
JSON Data:
|
| 131 |
---
|