Spaces:
Sleeping
Sleeping
DreamStream-1
commited on
Commit
•
66f7872
1
Parent(s):
d572e10
Update app.py
Browse files
app.py
CHANGED
@@ -48,6 +48,13 @@ def extract_skills_llama(text):
|
|
48 |
except Exception as e:
|
49 |
raise RuntimeError(f"Error during skill extraction: {e}")
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
# --- Qualification and Experience Extraction --- #
|
52 |
def extract_qualifications(text):
|
53 |
"""Extracts qualifications from text (e.g., degrees, certifications)."""
|
@@ -163,13 +170,13 @@ def analyze_resume(resume_file, job_description_file):
|
|
163 |
f"Qualifications Similarity: {qualifications_similarity:.2f}% ({categorize_similarity(qualifications_similarity)})",
|
164 |
f"Experience Similarity: {experience_similarity:.2f}% ({categorize_similarity(experience_similarity)})",
|
165 |
communication_response,
|
166 |
-
f"Sentiment: {sentiment}",
|
167 |
f"Resume Skills: {', '.join(resume_skills)}",
|
168 |
f"Job Description Skills: {', '.join(job_description_skills)}",
|
169 |
f"Resume Qualifications: {', '.join(resume_qualifications)}",
|
170 |
f"Job Description Qualifications: {', '.join(job_description_qualifications)}",
|
171 |
-
f"Resume Experience: {', '.join([
|
172 |
-
f"Job Description Experience: {', '.join([
|
173 |
)
|
174 |
|
175 |
# --- Gradio Interface --- #
|
|
|
48 |
except Exception as e:
|
49 |
raise RuntimeError(f"Error during skill extraction: {e}")
|
50 |
|
51 |
+
# --- Job Description Processing Function --- #
|
52 |
+
def process_job_description(text):
|
53 |
+
"""Extracts skills or relevant keywords from the job description."""
|
54 |
+
# You can customize this function as needed, for now, we'll use a basic extraction
|
55 |
+
# Using the Llama model or a simple regex-based approach for demonstration
|
56 |
+
return extract_skills_llama(text)
|
57 |
+
|
58 |
# --- Qualification and Experience Extraction --- #
|
59 |
def extract_qualifications(text):
|
60 |
"""Extracts qualifications from text (e.g., degrees, certifications)."""
|
|
|
170 |
f"Qualifications Similarity: {qualifications_similarity:.2f}% ({categorize_similarity(qualifications_similarity)})",
|
171 |
f"Experience Similarity: {experience_similarity:.2f}% ({categorize_similarity(experience_similarity)})",
|
172 |
communication_response,
|
173 |
+
f"Sentiment Analysis: {sentiment}",
|
174 |
f"Resume Skills: {', '.join(resume_skills)}",
|
175 |
f"Job Description Skills: {', '.join(job_description_skills)}",
|
176 |
f"Resume Qualifications: {', '.join(resume_qualifications)}",
|
177 |
f"Job Description Qualifications: {', '.join(job_description_qualifications)}",
|
178 |
+
f"Resume Experience: {', '.join([str(e) for e in resume_experience])}",
|
179 |
+
f"Job Description Experience: {', '.join([str(e) for e in job_description_experience])}"
|
180 |
)
|
181 |
|
182 |
# --- Gradio Interface --- #
|