Spaces:
Runtime error
Runtime error
π§ Gen AI Email Processing
This project is an AI-powered email processing system that reads, extracts, classifies, and analyzes emails and documents using LLaMA models. It supports OCR for images/PDFs and utilizes machine learning to classify emails.
π Tech Stack
- Python (Backend Development)
- FastAPI (API Framework)
- PyTorch & Transformers (AI Model - LLaMA)
- OCR Tools (Tesseract, pdfplumber, python-docx)
- Langchain & Sentence-Transformers (Text Processing & Embeddings)
- Uvicorn (ASGI Server)
- Scikit-learn & Pandas (Data Processing)
- LLama-CPP-Python (LLaMA Model Integration)
π₯ Installation & Setup
Follow these steps to set up the project on your local machine:
1οΈβ£ Clone the Repository
git clone https://github.com/your-username/gen_ai_email_processing.git
cd gen_ai_email_processing
2οΈβ£ Create a Virtual Environment
python -m venv env
source env/bin/activate # On macOS/Linux
env\Scripts\activate # On Windows
3οΈβ£ Install Dependencies
pip install --upgrade pip
pip install -r requirements.txt
4οΈβ£ Run the FastAPI Server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
5οΈβ£ Access the API Documentation
- Open Swagger UI: http://localhost:8000/docs
- Open ReDoc: http://localhost:8000/redoc
π¬ API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload-email |
Upload and process email |
| GET | /health |
Check API status |
π Environment Variables
Create a .env file in the config/ directory and add the necessary settings:
MODEL_PATH=/path/to/llama/model
OCR_LANGUAGE=eng
π Updating the Project
If you pull new changes from GitHub, remember to update dependencies:
git pull origin main
pip install -r requirements.txt
π€ Pushing the Project to GitHub
After making changes, push them to GitHub:
git add .
git commit -m "Updated project files"
git push origin main
π Contributing
Feel free to fork and contribute to this project! π