You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

🧠 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support