Model Card for Ticket Classifier

A fine-tuned DistilBERT model that automatically classifies customer support tickets into four categories: Billing Question, Feature Request, General Inquiry, and Technical Issue.

Model Details

Model Description

This model is a fine-tuned version of distilbert-base-uncased that has been trained to classify customer support tickets into predefined categories. It can help support teams automatically route tickets to the appropriate department.

  • Developed by: [Your Name/Organization]
  • Model type: Text Classification (DistilBERT)
  • Language(s): English
  • License: [Your License]
  • Finetuned from model: distilbert-base-uncased

Uses

Direct Use

This model can be directly used to classify incoming customer support tickets. It takes a text description of the customer's issue and classifies it into one of four categories:

  • Billing Question (0)
  • Feature Request (1)
  • General Inquiry (2)
  • Technical Issue (3)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Define class mapping
id_to_label = {0: 'Billing Question', 1: 'Feature Request', 2: 'General Inquiry', 3: 'Technical Issue'}

# Load model and tokenizer
YOUR_MODEL_PATH = 'Dragneel/Ticket-classification-model'
tokenizer = AutoTokenizer.from_pretrained("YOUR_MODEL_PATH")
model = AutoModelForSequenceClassification.from_pretrained("YOUR_MODEL_PATH")

# Prepare input
text = "I was charged twice for my subscription this month"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=128)

# Run inference
with torch.no_grad():
    outputs = model(**inputs)
    prediction = torch.argmax(outputs.logits, dim=1).item()
    
print(f"Predicted class: {id_to_label[prediction]}")
Downloads last month
7
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.