An AI-powered tool that analyses legal complaints, identifies relevant IPC sections, generates an FIR draft, and allows the user to download it as a PDF — all powered locally using Ollama and the Mistral model.
Legal Complaint Analyser simplifies and accelerates the process of analyzing written complaints for legal professionals and police departments.
By leveraging Ollama’s local inference and Mistral’s large language model, the system can:
- Understand the context of a complaint.
- Suggest the most relevant Indian Penal Code (IPC) sections.
- Auto-generate a well-structured FIR draft.
- Export the final report as a PDF file.
This project prioritizes data privacy, speed, and offline usability.
- 🧠 AI-Powered Legal Analysis — Uses Mistral via Ollama to interpret natural-language complaints.
- ⚖️ IPC Section Identification — Suggests relevant Indian Penal Code sections automatically.
- 🧾 FIR Draft Generator — Creates a formatted, editable FIR document based on model output.
- 📥 PDF Download — Converts the generated FIR draft into a downloadable PDF.
- 🔒 Offline & Secure — Entirely local execution using Ollama (no cloud calls).
- 🖥️ Simple Interface — Intuitive UI for inputting and reviewing complaints.
| Component | Technology |
|---|---|
| Language | Python |
| Backend Framework | Flask |
| LLM Runtime | Ollama |
| Model | Mistral (7B) |
| PDF Engine | ReportLab |
| IDE | Visual Studio Code |
- Python 3.10+
- Ollama installed on your system
- VS Code (recommended)
git clone https://github.com/yourusername/legal-complaint-analyser.git
cd legal-complaint-analyser