A high-performance AI platform that transforms long emails into concise, actionable summaries.
SmartSummarize is a complete, end-to-end Machine Learning ecosystem designed to solve the problem of email overload. Unlike standard generic tools, this project leverages a custom fine-tuned Flan-T5-Base model, trained specifically on over 18,000 real-world emails from the AESLC dataset.
It provides seamless integration into your daily workflow through a Chrome Extension, an elegant Web Dashboard, and a robust FastAPI Backend.
- 🧠 Fine-tuned LLM: Custom weights trained on the AESLC email dataset using LoRA for highly accurate summarization.
- 📩 Gmail Integration: Automatically reads and summarizes open emails directly within your Gmail interface.
- 🎨 Web Dashboard: A premium, dark-themed dashboard for direct text summarization.
- 🧩 Chrome Extension: Quick-access tool featuring a right-click "Summarize This" context menu support.
- ⚙️ Dual Mode: Choose between succinct Paragraph or structured Bullet Point summaries.
- ⚡ Fast Inference: Optimized to run efficiently on local CPUs—no expensive GPU required for inference.
- Model:
google/flan-t5-basefine-tuned via LoRA (Low-Rank Adaptation) - Backend: Python, FastAPI, Hugging Face Transformers, PyTorch
- Frontend: HTML5, Vanilla CSS (Premium Dark Theme), JavaScript
- Extension: Chrome Extension API (Manifest V3)
- Dataset: AESLC (Annotated Enron Subject Line Corpus) - 18,000 samples
Follow these instructions to set up the project locally on your machine.
- Python 3.9+
- Google Chrome Browser
- Git
- Clone this repository:
git clone https://github.com/Husrocks/smart-email-summarizer.git cd smart-email-summarizer - Install the required dependencies:
pip install -r backend/requirements.txt
- Start the backend FastAPI server:
python backend/main.py
Note: On the first run, the system will download the base Flan-T5 model (~900MB) and load your custom fine-tuned weights automatically.
- Navigate to the
frontend/directory. - Open
index.htmlin any modern web browser. - Ensure your backend server is running, paste your text, and start summarizing!
- Download
smart-email-summarizer-extension.zipfrom the repository root. - Extract the ZIP file to a known location.
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode (top right corner).
- Click Load unpacked and select the extracted folder.
- Open Chrome and navigate to
chrome://extensions/. - Enable Developer mode.
- Click Load unpacked and select the
extension/folder from this project directory. - Important: Click the extension icon in your toolbar once to ensure it connects to the running backend.
- In Gmail: Open any email, click the SmartSummarize extension icon in your toolbar, and it will automatically extract and summarize the email body.
- Right-Click Feature: Highlight text on any webpage, right-click, and select "Summarize This". The extension popup will display the generated summary.
- Web App: Use the standalone web application for custom text inputs and length adjustments (Short, Medium, Long).
smart-email-summarizer/
├── backend/ # FastAPI server and model inference logic
├── extension/ # Chrome Extension (MV3) with Gmail auto-detection
├── frontend/ # Premium web dashboard (HTML/CSS/JS)
├── training/ # Training scripts used to fine-tune the model
├── scripts/ # Data collection and preprocessing pipeline
├── models/ # Fine-tuned LoRA weights and checkpoints
└── README.md # Project documentation
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the terms specified in the LICENSE file. See LICENSE for more information.
Developed with ❤️ for Advanced AI Research.