Views
No views yet
DistilBERT model to classify job roles based on resume content. This model is trained to predict the most likely profession from the given resume text, supporting over 14 different job categories.1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="srivihari/resume-job-role-classifier")
4result = classifier("Experienced data scientist with Python, machine learning, and statistics background.")
5
6print(result)
7# Example output:
8# [{'label': 'Data Science', 'score': 0.97}]
9#Note: If you face any issues like token_type_ids errors, make sure to adjust tokenizer config as below:
10#from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
11
12#model = AutoModelForSequenceClassification.from_pretrained("srivihari/resume-job-role-classifier")
13#tokenizer = AutoTokenizer.from_pretrained("srivihari/resume-job-role-classifier")
14#tokenizer.model_input_names = ["input_ids", "attention_mask"]
15#classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
16