This project automates the manual processing of unstructured PDF documents for Appian Credit Union. It utilizes state-of-the-art machine learning and natural language processing techniques to extract, categorize, and summarize data efficiently. The system handles tasks such as text extraction, document categorization, and named entity recognition (NER), significantly reducing the time and effort required by employees.
- Text Extraction: Utilizes OCR tools (Tesseract, Google Vision API) to extract text from unstructured PDFs.
- Document Categorization: Classifies documents (e.g., receipts, identity proofs, applications) and associates them with individuals.
- Named Entity Recognition (NER): Extracts attributes like names, IDs, emails, and monetary values.
- Hierarchical Organization: Groups documents by individual and then by type.
- Summarization: Generates concise summaries for quick review.
- Resource Efficiency: Compressed to 5–6 GB, optimized for deployment on systems with limited GPU resources (4GB VRAM).
- Custom Model Integration: Includes LLaMA 3.1 8B model with FastLanguageModel for optimized performance.
- Fine-tuning: Uses LoRA adapters and a human feedback system for task-specific model improvements.
- High Volume of Data: Processes thousands of documents daily with scalable and efficient workflows.
- Accurate Information Extraction: Ensures high accuracy in extracting key details from diverse formats.
- Operational Efficiency: Eliminates repetitive, time-intensive tasks, boosting employee productivity and morale.
- Dependency Management: Optimized integration with Google Cloud Console for blob storage, ensuring seamless communication between the ML model and the backend.
- Python 3.8+
- Pip
- GPU with at least 4GB VRAM (Optional for better performance)
- Google Cloud Account (For blob storage)
Install dependencies using the following command:
pip install -r requirements.txtrequirements.txt:
- text
- torch>=1.12.1
- torchvision
- transformers>=4.25.0
- fastapi
- uvicorn
- pytesseract
- opencv-python
- numpy
- pandas
- google-cloud-storage
- scipy
- LoRA-adapters
- Clone the Repository:
git clone https://github.com/rohitk285/Appian.git
- Google Cloud Console:
- Configure blob storage.
- Set up authentication using a service account key.
- Environment Variables:
Create a .env file to store sensitive configurations:
- STORAGE_BUCKET_NAME="your-bucket-name"
- MONGO_URI="your-mongo-db-uri"
- SERVICE_ACCOUNT_FILE="your-service-account-file-path"
- Start the FastAPI backend:
uvicorn main:app --reload- Start the application frontend
cd frontend
npm install
npm run dev- Start the application frontend
cd backend
python server.py- Upload Document:
- Endpoint: /upload
- Method: POST
- Description: Uploads a PDF document for processing.
- Retrieve Processed Data:
- Endpoint: /results/{document_id}
- Method: GET
- Description: Retrieves the processed output, including extracted data and summaries.
To fine-tune the LLaMA 3.1 model using LoRA adapters:
python train.py --data-path /path/to/data --model llama3.1 --output-dir /path/to/output- OCR Module: Extracts text from PDFs.
- ML/NLP Module:
- Classification: Distinguishes document types.
- NER: Extracts entities (e.g., names, IDs).
- Summarization: Generates concise summaries.
- Integration:
- Google Cloud Storage: Stores processed documents and results.
- FastAPI: Provides a user-friendly API interface.
- Requires clean and legible PDFs for optimal OCR performance.
- Custom model training can be resource-intensive.
- Fork the repository.
- Create a feature branch (git checkout -b feature-name).
- Commit changes (git commit -m "Add feature").
- Push to the branch (git push origin feature-name).
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For queries, contact the project maintainer:
- Name: Manoj M J
- Email: manojmageesha@gamil.com





