|
|
||
|---|---|---|
| backend | ||
| frontend | ||
| sample_doc | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| README.md | ||
| download_models.py | ||
README.md
README.md
Document Processing App
This project is designed to process legal documents by hiding sensitive information such as names and company names. It utilizes the Ollama API with selected models for text processing. The application monitors a specified directory for new files, processes them automatically, and saves the results to a target path.
Project Structure
doc-processing-app
├── src
│ ├── main.py # Entry point of the application
│ ├── config
│ │ └── settings.py # Configuration settings for paths
│ ├── services
│ │ ├── file_monitor.py # Monitors directory for new files
│ │ ├── document_processor.py # Handles document processing logic
│ │ └── ollama_client.py # Interacts with the Ollama API
│ ├── utils
│ │ └── file_utils.py # Utility functions for file operations
│ └── models
│ └── document.py # Represents the structure of a document
├── tests
│ └── test_document_processor.py # Unit tests for DocumentProcessor
├── requirements.txt # Project dependencies
├── .env.example # Example environment variables
└── README.md # Project documentation
Setup Instructions
-
Clone the repository:
git clone <repository-url> cd doc-processing-app -
Install LibreOffice (required for document processing):
brew install libreoffice -
Install the required dependencies:
pip install -r requirements.txt pip install -U magic-pdf[full] -
Configure the application by editing the
src/config/settings.pyfile to set the paths for the object storage and target directory. -
Create a
.envfile based on the.env.examplefile to set up necessary environment variables.
Usage
To run the application, execute the following command:
python src/main.py
The application will start monitoring the specified directory for new documents. Once a new document is added, it will be processed automatically.
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.