Edit model card

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
  1. About the Company:
    Details about the hiring company, including its values, mission, and culture.

  2. Job Description:
    General information about the role, the tasks involved, and the purpose of the job.

  3. Job Requirements:
    Skills, qualifications, and experience needed for the job.

  4. Responsibilities:
    Specific tasks and duties associated with the role.

  5. Benefits:
    Information about the perks, benefits, and compensation offered.

  6. Other:
    Additional information that doesn't fit into the above categories.

Load the Model for Inference:

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}")
Downloads last month
21
Safetensors
Model size
335M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Space using AhmedBou/JoBert 1