A local email classification tool using Ollama (local LLM) and the Gmail API. This project aims to automatically categorize emails and apply labels for better inbox management.
- Uses a local LLM via Ollama for classification
- Integrates with Gmail API to fetch and label emails
- Modular design for easy extension and testing
email-classifier/ ├── README.md ├── requirements.txt ├── .gitignore ├── LICENSE │ ├── email_classifier/ │ ├── __init__.py │ ├── classifier.py # Core classification logic using Ollama │ ├── gmail_integration.py # Gmail API integration for reading/applying labels │ └── utils.py # Helper functions │ ├── tests/ │ └── test_classifier.py # Unit tests for classifier module │ └── scripts/ └── run_classifier.py # Script to execute the classifier
-
Clone the repository:
git clone https://github.com/your-username/email-classifier.git cd email-classifier
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Additional setup (coming soon):
- Configure Gmail API credentials
- Set up Ollama locally with the desired model
- Python 3.10+
- Gmail API credentials
- Ollama installed and running locally
- See
requirements.txt
for full dependency list
Note:
This project is a work in progress. Contributions and suggestions are welcome!