Spaces:
Sleeping
Sleeping
Delete README.md
Browse files
README.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
# JusticeAI – Criminal Record Analyzer
|
| 3 |
-
|
| 4 |
-
JusticeAI is an AI-powered legal assistant that analyzes and summarizes criminal case records. It extracts key information such as names, crimes, locations, and judgments, then provides legal insights, including applicable laws and recommended punishments, based on Nigerian criminal law.
|
| 5 |
-
|
| 6 |
-
## Features
|
| 7 |
-
|
| 8 |
-
- Automatically summarizes long-form legal/criminal case text
|
| 9 |
-
- Extracts key named entities (people, locations, crimes, dates, institutions)
|
| 10 |
-
- Classifies crimes based on keywords and legal context
|
| 11 |
-
- Recommends legal punishments based on Nigerian criminal law
|
| 12 |
-
- User-friendly interface powered by Gradio
|
| 13 |
-
|
| 14 |
-
## Technologies Used
|
| 15 |
-
|
| 16 |
-
- Python 3
|
| 17 |
-
- Hugging Face Transformers
|
| 18 |
-
- PyTorch
|
| 19 |
-
- Gradio (for the web interface)
|
| 20 |
-
|
| 21 |
-
## Getting Started
|
| 22 |
-
|
| 23 |
-
To run the app locally:
|
| 24 |
-
|
| 25 |
-
1. Clone or download this repository.
|
| 26 |
-
2. Make sure you have Python 3 installed.
|
| 27 |
-
3. Install required dependencies:
|
| 28 |
-
|
| 29 |
-
```bash
|
| 30 |
-
pip install -r requirements.txt
|
| 31 |
-
```
|
| 32 |
-
|
| 33 |
-
4. Run the application:
|
| 34 |
-
|
| 35 |
-
```bash
|
| 36 |
-
python main.py
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
5. The app will launch in your browser at:
|
| 40 |
-
|
| 41 |
-
```
|
| 42 |
-
http://127.0.0.1:7860
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
## Example Input
|
| 46 |
-
|
| 47 |
-
```
|
| 48 |
-
On April 10, 2022, Sarah Johnson was arrested for armed robbery and sentenced to life imprisonment by the High Court in Kaduna.
|
| 49 |
-
```
|
| 50 |
-
|
| 51 |
-
## Example Output
|
| 52 |
-
|
| 53 |
-
- **Summary**: A brief summary of the case
|
| 54 |
-
- **Extracted Entities**: Names, crimes, places, and dates identified from the input
|
| 55 |
-
- **Legal Analysis**:
|
| 56 |
-
- Crime: Armed Robbery
|
| 57 |
-
- Applicable Law: Robbery and Firearms Act, Section 1
|
| 58 |
-
- Recommended Punishment: Death penalty or life imprisonment
|
| 59 |
-
|
| 60 |
-
## Deployment (Hugging Face Spaces)
|
| 61 |
-
|
| 62 |
-
To deploy this app:
|
| 63 |
-
|
| 64 |
-
1. Create a new Space at [Hugging Face Spaces](https://huggingface.co/spaces)
|
| 65 |
-
2. Select the **Gradio SDK**
|
| 66 |
-
3. Upload:
|
| 67 |
-
- `main.py`
|
| 68 |
-
- `requirements.txt`
|
| 69 |
-
- `README.md` (optional)
|
| 70 |
-
4. The app will build and launch automatically.
|
| 71 |
-
|
| 72 |
-
You will receive a permanent URL like:
|
| 73 |
-
|
| 74 |
-
```
|
| 75 |
-
https://your-username.hf.space/justiceai-analyzer
|
| 76 |
-
```
|
| 77 |
-
|
| 78 |
-
## License
|
| 79 |
-
|
| 80 |
-
This project is open-source and built for educational and civic innovation purposes. Contributions and adaptations are welcome with appropriate credit.
|
| 81 |
-
|
| 82 |
-
---
|
| 83 |
-
|
| 84 |
-
Built for the **RAIN Hackathon 2025** at the University of Ibadan.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|