🚦 Civic Issue Priority Classification Model

This model classifies civic issue reports (text descriptions) into three priority levels β€” High, Medium, and Low β€” to assist municipal systems in automatically routing and prioritizing citizen complaints.


🧠 Model Details

Model Description

This model fine-tunes DistilBERT (distilbert-base-uncased) for text classification to predict the priority of civic issues reported by citizens through an app or web portal.

  • Model Type: DistilBERT For Sequence Classification
  • Language: English
  • Fine-tuned On: Custom civic issue dataset
  • Labels:
    • 0 β†’ Low (Minor issues, e.g., paint fade, broken bench)
    • 1 β†’ Medium (Moderate issues, e.g., streetlight not working, drainage blockage)
    • 2 β†’ High (Critical issues, e.g., gas leak, transformer fire, road flood)

πŸ“Š Training Details

Dataset

A custom dataset of 30 handcrafted civic issue reports divided evenly into three categories:

  • 10 High priority examples
  • 10 Medium priority examples
  • 10 Low priority examples

Each example represents a real-world scenario commonly reported in urban complaint systems.

Training Configuration

Hyperparameter Value
Base model distilbert-base-uncased
Batch size 4
Epochs 15
Learning rate 3e-5
Weight decay 0.02
Max sequence length 64
Optimizer AdamW
Evaluation strategy per epoch

Hardware

  • Trained on: Google Colab (T4 GPU)
  • Framework: PyTorch + Hugging Face Transformers

βš™οΈ How to Use

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
import torch.nn.functional as F

# Load model
tokenizer = AutoTokenizer.from_pretrained("mrigaanksharma/priority-classifier")
model = AutoModelForSequenceClassification.from_pretrained("mrigaanksharma/priority-classifier")

text = "Transformer caught fire near main road"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
probs = F.softmax(outputs.logits, dim=-1)
pred = torch.argmax(probs).item()
confidence = torch.max(probs).item()

label_map = {0: "Low", 1: "Medium", 2: "High"}
print(f"Text: {text}")
print(f"Predicted Label: {label_map[pred]} (Confidence: {confidence:.2f})")
Downloads last month
8
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Spaces using mrigaanksh/priority-classification-distilbert 2