0xrushi / emailgenius

EmailGenius: AI-Driven Email Categorization
MIT License
12 stars 4 forks source link

Introduction

EmailGenius is an AI-driven email categorization tool that automates the process of sorting and labeling emails using the Opensource LLAMA API. It connects to an IMAP server, fetches emails, and categorizes them based on user-defined criteria. The project also includes a Streamlit interface for an interactive user experience.

Purpose

The market offers various proprietary email categorization and management tools, including:

However, these tools have limitations, such as not being opensource and requiring payment and often adopting a pricing model based on each email account. With the ongoing democratization of AI, it's expected that even standard servers will be capable of running similar processes more affordably, accommodating any number of accounts within the next five years.

In contrast, widely-used email services like Microsoft Outlook, Gmail, and Zoho Mail can be cumbersome in setting up email filter rules, often involving numerous steps. Moreover, users frequently encounter issues where emails from unsubscribed websites persist in appearing in their inboxes.

Requirements

Installation

  1. Clone the repository:
    git clone https://github.com/0xrushi/emailgenius.git
  2. Navigate to the project directory:
    cd emailgenius
  3. Install the required Python packages:
    pip install -r requirements.txt

Configuration

  1. Create a .env file in the project root with the following variables:
    • OPENAI_API_KEY - Your OpenAI API key.
    • OPENAI_API_BASE - OpenAI API base URL.
    • USERNAME - IMAP server username.
    • PASSWORD - IMAP server password.
  2. Load environment variables:
    load_dotenv()

Usage

  1. To ingest emails from your IMAP server to a data/email_data.json file:
    streamlit run src/main.py -- --ingest true
  2. To run the Streamlit app for categorization:
    streamlit run src/main.py
  3. To use it in production:
    streamlit run src/main.py -- --approve true

Streamlit App

Screenshots

Screenshot 2023-11-28 at 9 44 10 PM Screenshot 2023-11-28 at 9 49 00 PM Screenshot 2023-11-28 at 10 12 53 PM Screenshot 2023-11-28 at 10 13 08 PM

Limitations

Contributing

Contributions to EmailGenius are welcome. Please follow the standard fork, branch, and pull request workflow.

Buy Me A Coffee