Spaces:
Sleeping
Sleeping
File size: 647 Bytes
8616f6a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from keybert import KeyBERT
import re
kw_model = KeyBERT()
def classify_cv(text) -> str:
technical_keywords = ['python', 'engineering', 'developer', 'AI', 'ML', 'software']
non_technical_keywords = ['sales', 'management', 'HR', 'marketing', 'finance']
tech_score = sum([text.lower().count(k) for k in technical_keywords])
nontech_score = sum([text.lower().count(k) for k in non_technical_keywords])
return "Technical" if tech_score >= nontech_score else "Non-Technical"
def get_skill_score(text) -> int:
keywords = kw_model.extract_keywords(text, top_n=10)
score = min(100, int(len(keywords) * 10))
return score
|