How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="briefme-io/legal_document_classifier")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("briefme-io/legal_document_classifier")
model = AutoModelForSequenceClassification.from_pretrained("briefme-io/legal_document_classifier", device_map="auto")
Quick Links

Legal Document Classifier

This is a fine-tuned BERT-based model for classifying legal documents into contract, amendment, or other.

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained("karthikvarunn/legal_document_classifier")
tokenizer = AutoTokenizer.from_pretrained("karthikvarunn/legal_document_classifier")

inputs = tokenizer("Your document text here...", return_tensors="pt")
outputs = model(**inputs)
Downloads last month
11
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support