Downloads · 30 days
33
1% of all-time downloads
AhmedBou/JoBert
JoBert is a text classification model from AhmedBou. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
JoBert is a text classifier designed to analyze job offer paragraph texts and categorize each one into predefined 5 classes.
Downloads · 30 days
33
1% of all-time downloads
All-time downloads
2.7K
Public
Parameters
335M
1.3 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
JoBert is a text classifier designed to analyze job offer paragraph texts and categorize each one into predefined 5 classes.
Please refer to this repository when using the model.
Classes:
About the Company:
Details about the hiring company, including its values, mission, and culture.
Job Description:
General information about the role, the tasks involved, and the purpose of the job.
Job Requirements:
Skills, qualifications, and experience needed for the job.
Responsibilities:
Specific tasks and duties associated with the role.
Benefits:
Information about the perks, benefits, and compensation offered.
Other:
Additional information that doesn't fit into the above categories.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("AhmedBou/JoBert")
model = AutoModelForSequenceClassification.from_pretrained("AhmedBou/JoBert")
label_names = ['About the Company', 'Job Description', 'Job Requirements', 'Responsibilities', 'Benefits', 'Other']
inference_model = model
text_snippet = "you must know how to use Python, Java, and SQL, and you should have 3 years of experience"
inference_inputs = tokenizer(text_snippet, return_tensors='pt')
inference_inputs = {key: val for key, val in inference_inputs.items()}
inference_outputs = inference_model(**inference_inputs)
inference_logits = inference_outputs.logits
inference_prediction = torch.argmax(inference_logits).item()
inference_label_name = label_names[inference_prediction]
print(f"Inference Result: Predicted Label - {inference_label_name}")