Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -60,14 +60,15 @@ def process_resumes(files):
|
|
60 |
entities = ner_pipeline(cleaned_text)
|
61 |
classification = classify_resume_ner(entities)
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
71 |
return all_results
|
72 |
|
73 |
def classify_resumes_with_model(files):
|
|
|
60 |
entities = ner_pipeline(cleaned_text)
|
61 |
classification = classify_resume_ner(entities)
|
62 |
|
63 |
+
all_results[file_name] = {
|
64 |
+
"Persons": list({e["word"] for e in entities if e["entity_group"] == "PER"}),
|
65 |
+
"Organizations": list({e["word"] for e in entities if e["entity_group"] == "ORG"}),
|
66 |
+
"Locations": list({e["word"] for e in entities if e["entity_group"] == "LOC"}),
|
67 |
+
"Other Entities": list({e["word"] for e in entities if e["entity_group"] not in ["PER", "ORG", "LOC"]}),
|
68 |
+
"Cleaned_Text": cleaned_text,
|
69 |
+
"Classification (NER)": classification
|
70 |
+
}
|
71 |
+
|
72 |
return all_results
|
73 |
|
74 |
def classify_resumes_with_model(files):
|