🧠 LawSight – IPC Section Matcher (BERT-based)
This model is part of LawSight – an AI-powered legal assistance tool designed to suggest applicable Indian Penal Code (IPC) sections based on user complaints.
It uses BERT embeddings and a fine-tuned classification head to intelligently match free-form complaint descriptions with relevant IPC sections.
📌 Use Cases
- 👮 Law enforcement automation
- ⚖️ Legal aid applications
- 📚 Legal NLP research
- 🧾 FIR assistance & section classification
🚀 Model Details
- Architecture: BERT (base model) with a custom classification head
- Input: Complaint text in English
- Output: One or more IPC section numbers with confidence scores
- Fine-Tuned On: Custom dataset of IPC-tagged complaints
- Multilingual Support: Input preprocessed using translation for multilingual capabilities
🔧 How to Use
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model
model_name = "ri2000/IPC_matcher"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Sample input
complaint = "A man forcefully entered my house and tried to harm me."
# Tokenize
inputs = tokenizer(complaint, return_tensors="pt", truncation=True, padding=True)
# Predict
outputs = model(**inputs)
logits = outputs.logits
predicted = torch.argmax(logits, dim=1)
# Show result
print(f"Predicted IPC Section ID: {predicted.item()}")
📦 Access to Dataset & Model Weights
Access to the full dataset and model training pipeline is available upon request:
👉 Request Access via Google Form
👩💻 Developed By
Riya,Sachi & Tanmay
With support from the LawSight Team
Built with ❤️ for societal impact.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support