CoolFace
Modelpublic

TheGod-2003/legal-summarizer

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes81downloads
Model Card

๐Ÿง  Legal Summarizer Model (Indian Legal Domain)

This model is a fine-tuned version of `allenai/led-base-16384`, specifically trained on a curated dataset of Indian legal documents. It is optimized for summarizing long legal texts such as court judgments, case laws, contracts, and regulatory documents originating from the Indian judiciary and legal system.

๐Ÿ“Œ Model Use Case

Designed to generate concise and informative summaries of lengthy legal documents, such as:

  • โ€”Contracts
  • โ€”Legal notices
  • โ€”Judgments
  • โ€”Regulatory texts

๐Ÿ“Œ Model Use Case

This model is intended for summarizing complex and lengthy legal documents from the Indian legal system, including:

  • โ€”Court judgments (Supreme Court, High Courts)
  • โ€”Government acts and bills
  • โ€”Contracts governed by Indian law
  • โ€”Legal notices and petitions

๐Ÿ‡ฎ๐Ÿ‡ณ Domain Specialization

Unlike general-purpose summarization models, this model has been trained specifically on Indian legal content. This includes:

  • โ€”Judgments and case laws sourced from Indian court databases
  • โ€”Indian statutes, acts, and amendments
  • โ€”Public legal notices and contract templates relevant to Indian jurisprudence

The vocabulary, phrasing, and structure of Indian legal writing have been captured more accurately by this model.

๐Ÿ“ˆ Evaluation Metrics

MetricScore
ROUGE-150.13
ROUGE-227.15
ROUGE-L28.14
ROUGE-Lsum44.75

๐Ÿš€ How to Use

python
from transformers import LEDTokenizer, LEDForConditionalGeneration

tokenizer = LEDTokenizer.from_pretrained("TheGod-2003/legal-summarizer")
model = LEDForConditionalGeneration.from_pretrained("TheGod-2003/legal-summarizer")

text = "Your long legal document here..."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=16384)
summary_ids = model.generate(inputs["input_ids"], max_length=512, num_beams=4)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)

print(summary)