Skip to content

[Refactor] Engine Consolidation: Build a universal ocr_summarizer.py #182

Description

@centiceron

Objective:

Our engine/ directory is bloated with reluctant hardcoded .py scripts like bail_analyzer.py, risk_analyzer.py, summarizer.py, and deadline_extractor.py all perform seperate tasks, which can be implemented using one single script - ocr_summarizer with customized system prompt. This ensures that the engine/ directory does not have any unnecessary scripts.

Action Items:

  • Create a new central script: engine/ocr_summarizer.py.

  • Create a single, universal execution function in ocr_summarizer.py that accepts (text, prompt_type).

  • Refactor the UI pages to call ocr_summarizer.py instead of the individual scripts and modify the UI code in Document OCR to extract the keywords from the LLM response - this can be achieved with proper system prompts.

  • Delete the redundant _analyzer scripts once the router is confirmed working.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions