Skip to content

pkafei/Police-Report-Processing

Repository files navigation

Document Upload and Extraction Feature 👮🏼✨📄

Watch the Walkthrough

Overview

  • Frontend: Next.js (coming soon)
  • Backend: Django
  • DevOps: AWS (coming soon)

💻 Code Walkthrough

🎥 Demo Walkthrough

How It Works

A paralegal uploads, and reviews a scanned police report using this feature. The application extracts the text and displays it next to the original document for easy comparison and editing. It then generates a summary, tags, and extracted details, which the user reviews, edits, and confirms.

  1. Upload scanned police report via New Case form

  2. View extracted text next to the original document

  3. Edit or confirm the extracted text

  4. Backend saves final text and document embedding

  5. View system-generated summary, tags, entities, and locations

  6. Approve or edit the date, city, summary or type of crime each item

  7. Click "Save" to complete the process

How to Run Locally

  1. Install Docker Desktop
  2. Clone project git clone https://github.com/pkafei/Police-Report-Processing
  3. Navigate to the project directory: cd Police-Report-Processing
  4. Copy the environment file: cp .env.example .env
  5. In the project root run: docker-compose down -v && docker-compose up --build ⚠️ This will take a little while on the first run as Docker builds the containers
  6. Once running, open the app in your browser: http://localhost:8000/upload in your browser ⌛️ It takes about a minute to process the uploaded document

Missing / Future Work

Frontend:

  • Add Next.js/Typescript frontend
  • Connect Next.js frontend to Django API

Backend:

  • Better error handling for views
  • Add tests
  • Create POST, UPDATE, and GET endpoints

DevOps:

  • Put app in Docker container
  • Add AWS Lambda function to process documents (Extracts text from PDF, and generating tags)
  • Add AWS S3 bucket to store documents (prevent bloating the Postgres database)
  • Add a CLI/CD tests (pytest) pipeline using GitHub Actions and Pipeline

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors