Spaces:
Sleeping
Sleeping
Update Home.py
Browse files
Home.py
CHANGED
|
@@ -138,22 +138,27 @@ if uploaded_file:
|
|
| 138 |
|
| 139 |
except Exception as e:
|
| 140 |
st.error(f"β Failed to parse {filename}: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
if parsed_resumes:
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
st.write(f"Exists now? {os.path.exists(target_path)}")
|
| 158 |
-
else:
|
| 159 |
-
st.warning(f"β Rejected: {resume['Name']}")
|
|
|
|
| 138 |
|
| 139 |
except Exception as e:
|
| 140 |
st.error(f"β Failed to parse {filename}: {e}")
|
| 141 |
+
skill_categories = {
|
| 142 |
+
"Programming Languages" : ["Python"],
|
| 143 |
+
"Data Analysis & Visualisation": ["Pandas", "Numpy", "Excel", "Matplotlib", "Seaborn"],
|
| 144 |
+
"Database Management": ["SQL", "Power BI"],
|
| 145 |
+
"Deep Learning": ["ANN", "CNN", "RNN"],
|
| 146 |
+
"Machine Learning": ["Scikit-learn", "OpenCV", "NLP", "Supervised learning", "Optuna", "Descriptive Statistics"],
|
| 147 |
+
"Generative AI": ["Langchain", "LLMs"]
|
| 148 |
+
}
|
| 149 |
|
| 150 |
if parsed_resumes:
|
| 151 |
+
selected_categories = st.multiselect("Select required skill categories", list(skill_categories.keys()))
|
| 152 |
+
|
| 153 |
+
if st.button("Evaluate Resumes"):
|
| 154 |
+
required_keywords = set()
|
| 155 |
+
for category in selected_categories:
|
| 156 |
+
required_keywords.update(skill_categories[category])
|
| 157 |
+
|
| 158 |
+
for resume in parsed_resumes:
|
| 159 |
+
# Match: If any required keyword is in the resume skills
|
| 160 |
+
if any(req_skill.lower() in (skill.lower() for skill in resume["Skills"]) for req_skill in required_keywords):
|
| 161 |
+
st.success(f"β
Selected: {resume['Name']}")
|
| 162 |
+
shutil.copy(resume["file_path"], os.path.join(SELECTED_FOLDER, os.path.basename(resume["file_path"])))
|
| 163 |
+
else:
|
| 164 |
+
st.warning(f"β Rejected: {resume['Name']}")
|
|
|
|
|
|
|
|
|