Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,30 +61,30 @@ def analyze_with_mistral(resume_text, job_description):
|
|
| 61 |
{
|
| 62 |
"role": "user",
|
| 63 |
"content": """
|
| 64 |
-
Analyze the provided resume against the job description for ATS compatibility.
|
| 65 |
|
| 66 |
-
Return the output in EXACTLY this JSON format, with no deviations:
|
| 67 |
{
|
| 68 |
"ATS Parameters": {
|
| 69 |
"Keywords": {
|
| 70 |
"Match": <integer score between 0 and 100>,
|
| 71 |
-
"Recommendation": [<list of specific keywords to add or emphasize>]
|
| 72 |
},
|
| 73 |
"Formatting": {
|
| 74 |
"Match": <integer score between 0 and 100>,
|
| 75 |
-
"Recommendation": [<list of specific formatting suggestions>]
|
| 76 |
},
|
| 77 |
"Skills Match": {
|
| 78 |
"Match": <integer score between 0 and 100>,
|
| 79 |
-
"Recommendation": [<list of specific skills to include or highlight>]
|
| 80 |
},
|
| 81 |
"Experience Relevance": {
|
| 82 |
"Match": <integer score between 0 and 100>,
|
| 83 |
-
"Recommendation": [<list of suggestions to improve experience alignment>]
|
| 84 |
},
|
| 85 |
"Education": {
|
| 86 |
"Match": <integer score between 0 and 100>,
|
| 87 |
-
"Recommendation": [<list of suggestions to improve education section>]
|
| 88 |
}
|
| 89 |
},
|
| 90 |
"Score": {
|
|
@@ -97,10 +97,13 @@ def analyze_with_mistral(resume_text, job_description):
|
|
| 97 |
}
|
| 98 |
}
|
| 99 |
|
| 100 |
-
|
| 101 |
-
-
|
| 102 |
-
-
|
| 103 |
-
-
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
Resume:
|
| 106 |
{resume_text}
|
|
@@ -109,7 +112,7 @@ def analyze_with_mistral(resume_text, job_description):
|
|
| 109 |
{job_description}
|
| 110 |
"""
|
| 111 |
}
|
| 112 |
-
|
| 113 |
|
| 114 |
payload = {
|
| 115 |
"model": "mistralai/Mistral-7B-Instruct-v0.3",
|
|
|
|
| 61 |
{
|
| 62 |
"role": "user",
|
| 63 |
"content": """
|
| 64 |
+
Analyze the provided resume against the job description for ATS compatibility. Assess how well the resume aligns with ATS requirements and the job description in terms of keywords, formatting, skills, experience relevance, and education. Provide concise, actionable recommendations for improvement.
|
| 65 |
|
| 66 |
+
Return the output in EXACTLY this JSON format, with no deviations, ensuring the full structure is complete:
|
| 67 |
{
|
| 68 |
"ATS Parameters": {
|
| 69 |
"Keywords": {
|
| 70 |
"Match": <integer score between 0 and 100>,
|
| 71 |
+
"Recommendation": [<list of 2-5 specific keywords to add or emphasize>]
|
| 72 |
},
|
| 73 |
"Formatting": {
|
| 74 |
"Match": <integer score between 0 and 100>,
|
| 75 |
+
"Recommendation": [<list of 2-5 specific formatting suggestions>]
|
| 76 |
},
|
| 77 |
"Skills Match": {
|
| 78 |
"Match": <integer score between 0 and 100>,
|
| 79 |
+
"Recommendation": [<list of 2-5 specific skills to include or highlight>]
|
| 80 |
},
|
| 81 |
"Experience Relevance": {
|
| 82 |
"Match": <integer score between 0 and 100>,
|
| 83 |
+
"Recommendation": [<list of 2-5 suggestions to improve experience alignment>]
|
| 84 |
},
|
| 85 |
"Education": {
|
| 86 |
"Match": <integer score between 0 and 100>,
|
| 87 |
+
"Recommendation": [<list of 2-5 suggestions to improve education section>]
|
| 88 |
}
|
| 89 |
},
|
| 90 |
"Score": {
|
|
|
|
| 97 |
}
|
| 98 |
}
|
| 99 |
|
| 100 |
+
Rules:
|
| 101 |
+
- All "Match" values must be integers between 0 and 100.
|
| 102 |
+
- All "Recommendation" fields must be lists of strings (2-5 items max), or empty lists ([]) if no suggestions apply.
|
| 103 |
+
- "Overall" score is the average of the five "Score" values, rounded to the nearest integer.
|
| 104 |
+
- Base analysis on typical ATS requirements (e.g., keyword density, simple formatting, clear sections) and the job description.
|
| 105 |
+
- Ensure the ENTIRE JSON structure is returned, even if recommendations are minimal.
|
| 106 |
+
- Keep recommendations concise to fit within response limits.
|
| 107 |
|
| 108 |
Resume:
|
| 109 |
{resume_text}
|
|
|
|
| 112 |
{job_description}
|
| 113 |
"""
|
| 114 |
}
|
| 115 |
+
]
|
| 116 |
|
| 117 |
payload = {
|
| 118 |
"model": "mistralai/Mistral-7B-Instruct-v0.3",
|