Spaces:
Sleeping
Sleeping
metadata
title: ClauseGuard
emoji: π‘οΈ
colorFrom: gray
colorTo: gray
sdk: gradio
sdk_version: 5.23.0
python_version: '3.12'
app_file: app.py
pinned: false
π‘οΈ ClauseGuard β AI Contract Analysis
The world's most comprehensive open-source legal contract analysis tool.
ClauseGuard automatically analyzes legal contracts using state-of-the-art NLP models fine-tuned on legal data.
β¨ Features
Core Analysis
- 41 CUAD Clause Categories β Detects and classifies clauses across the full CUAD taxonomy (Document Name, Parties, Governing Law, Indemnification, Termination, Non-Compete, IP Ownership, etc.)
- 4-Tier Risk Scoring β Critical / High / Medium / Low with visual risk matrix
- Legal NER β Extracts parties, dates, monetary values, jurisdictions, defined terms
- NLI Contradiction Detection β Identifies conflicting clauses and missing critical provisions
- PDF / DOCX / TXT Support β Upload any contract format
UI/UX
- 3-Panel Professional Layout β Sidebar upload + Main analysis + Summary dashboard
- Document Viewer β Text with inline entity highlights
- Clause Cards β Expandable cards with risk badges and descriptions
- Export Reports β JSON (structured data) and CSV (tabular) downloads
- Color-Coded Risk Badges β Visual indicators for quick triage
π§ Models Used
| Component | Model |
|---|---|
| Clause Classification | Mokshith31/legalbert-contract-clause-classification (LoRA on nlpaueb/legal-bert-base-uncased) |
| Fallback Detection | Regex patterns covering 15+ clause types |
| NER | Rule-based with 7 entity types (dates, money, parties, jurisdictions, defined terms) |
| NLI | Heuristic contradiction detection across 5 conflict patterns |
π Datasets
- CUAD β 510 contracts, 13K annotations, 41 clause categories
- LegalBench β 322 legal reasoning tasks
- LexGLUE β Unfair Terms of Service classification
π Usage
- Upload a contract (PDF, DOCX, or TXT) or paste text directly
- Click Analyze Contract
- View results across tabs: Document, Clauses, Entities, Contradictions
- Download JSON/CSV reports
β οΈ Disclaimer
Not legal advice. ClauseGuard is an AI-powered analysis tool for informational purposes only. Always consult a qualified attorney for legal decisions.