Downloads · 30 days
16
11% of all-time downloads
satviksh09/PnHLayman
PnHLayman is a text generation model from satviksh09. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This T5-based model is fine-tuned to generate layman-friendly summaries of legal judgments from Punjab and Haryana courts.
Downloads · 30 days
16
11% of all-time downloads
All-time downloads
149
Public
Parameters
223M
892 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors892 MB · 100%
From the Hugging Face model README
This T5-based model is fine-tuned to generate layman-friendly summaries of legal judgments from Punjab and Haryana courts.
Each example contains:
Judgement (full text of the court order)summary (expert-written abstract)Total of ~7000 examples covering diverse case types (civil, criminal, administrative).
from transformers import T5Tokenizer, T5ForConditionalGeneration
MODEL_ID = "satviksh09/PnHLayman"
tokenizer = T5Tokenizer.from_pretrained(MODEL_ID)
model = T5ForConditionalGeneration.from_pretrained(MODEL_ID)
text = "Full text of a Punjab court judgment goes here..."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=1024)
outputs = model.generate(**inputs, max_length=256, num_beams=5, early_stopping=True)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Layman Summary:", summary)