JoBert / README.md
AhmedBou's picture
Update README.md
38d4992 verified
---
license: apache-2.0
language:
- en
widget:
- text: >-
We work with political parties, investors, media organisations, think tanks,
NGOs and companies of all sizes around the world to help them understand
public opinion, how it affects them, and what they should do in response to
it.
- text: >-
5+ years of experience in data analysis, data science, decision science, or
similar quantitative fields, applying experimentation methods to test
various hypotheses for customer segmentation, consumer sentiment or
perception, and outbound online marketing campaign evaluation
- text: >-
We offer a competitive salaries based on candidate's qualifications. We also
offers three weeks paid vacation per year, paid holidays, a 401(k) plan with
employee matching funds, a discretionary bonus and an overall comprehensive
benefits package.
pipeline_tag: text-classification
---
# JoBert
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.
- **Developed by:** AhmedBou
- **License:** apache-2.0
**Classes:**
- About the Company
- Job Description
- Job Requirements
- Responsibilities
- Benefits
- Other
0. **About the Company:**
Details about the hiring company, including its values, mission, and culture.
1. **Job Description:**
General information about the role, the tasks involved, and the purpose of the job.
2. **Job Requirements:**
Skills, qualifications, and experience needed for the job.
3. **Responsibilities:**
Specific tasks and duties associated with the role.
4. **Benefits:**
Information about the perks, benefits, and compensation offered.
5. **Other:**
Additional information that doesn't fit into the above categories.
## Load the Model for Inference:
```python
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}")