Update app.py
Browse files
app.py
CHANGED
|
@@ -107,6 +107,22 @@ def extract_entities_via_gemini(resume_text):
|
|
| 107 |
|
| 108 |
return extracted_info
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
# Function to check similarity between resumes and job description
|
| 111 |
def check_similarity(job_description, resume_files):
|
| 112 |
results = []
|
|
@@ -187,5 +203,5 @@ interface = gr.Interface(
|
|
| 187 |
allow_flagging="never"
|
| 188 |
)
|
| 189 |
|
| 190 |
-
#
|
| 191 |
interface.launch()
|
|
|
|
| 107 |
|
| 108 |
return extracted_info
|
| 109 |
|
| 110 |
+
# Function to extract leadership experience (this function was missing previously)
|
| 111 |
+
def extract_leadership_experience(resume_text):
|
| 112 |
+
# Define common leadership keywords/phrases
|
| 113 |
+
leadership_keywords = [
|
| 114 |
+
"leadership", "manager", "team lead", "supervisor",
|
| 115 |
+
"director", "team leader", "managed", "led",
|
| 116 |
+
"supervised", "coordinated", "coaching", "mentored"
|
| 117 |
+
]
|
| 118 |
+
|
| 119 |
+
# Search for the keywords in the resume text
|
| 120 |
+
for keyword in leadership_keywords:
|
| 121 |
+
if re.search(r"\b" + re.escape(keyword) + r"\b", resume_text, re.IGNORECASE):
|
| 122 |
+
return "Yes" # Leadership experience found
|
| 123 |
+
|
| 124 |
+
return "No" # No leadership experience found
|
| 125 |
+
|
| 126 |
# Function to check similarity between resumes and job description
|
| 127 |
def check_similarity(job_description, resume_files):
|
| 128 |
results = []
|
|
|
|
| 203 |
allow_flagging="never"
|
| 204 |
)
|
| 205 |
|
| 206 |
+
# Launch the interface
|
| 207 |
interface.launch()
|