Downloads · 30 days
6
8% of all-time downloads
arhansd1/t5_small_skill_loc
t5_small_skill_loc is a machine learning model from arhansd1. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model extracts skills and location from job descriptions using T5.
Downloads · 30 days
6
8% of all-time downloads
All-time downloads
73
Public
Parameters
223M
5.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.pt3.6 GB · 57%
From the Hugging Face model README
This model extracts skills and location from job descriptions using T5.
t5-baseskills: <skills>, location: <location>from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
model_name = "arhansd1/t5_small_skill_loc"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name).to(device)
def extract_skills_and_location(job_description):
input_text = "Extract skills and location: " + job_description
inputs = tokenizer(input_text, return_tensors="pt", truncation=True, max_length=512).to(device)
with torch.no_grad():
outputs = model.generate(inputs.input_ids, max_length=128, num_beams=4, early_stopping=True)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# 🔍 Example
sample = "Enter a sample description"
print(extract_skills_and_location(sample))