Get the AI Email Summarizer running in under 5 minutes!
- Python 3.9+ (Python 3.13+ recommended)
- Git
- Basic terminal knowledge
git clone https://github.com/arjungop/ai-email-summarizer.git
cd ai-email-summarizer# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate # macOS/Linux
# OR
venv\Scripts\activate # Windowspip install -r requirements.txt# Make sure virtual environment is active
source venv/bin/activate
# Start FastAPI server
uvicorn backend.main:app --reload --port 8080✅ Backend will be available at: http://localhost:8080
# In a new terminal, activate environment
source venv/bin/activate
# Start Streamlit app
streamlit run frontend/streamlit_app.py✅ Frontend will be available at: http://localhost:8501
Visit: http://localhost:8080/health
Expected response: {"status": "healthy", "message": "Email Summarizer API is running"}
Visit: http://localhost:8080/docs Interactive Swagger documentation for testing API endpoints
Visit: http://localhost:8501
- Try the sample email thread in the sidebar
- Paste your own email content
- Test different summary modes
curl -X POST "http://localhost:8080/api/summarize" \
-H "Content-Type: application/json" \
-d '{
"content": "Your email content here...",
"source": "manual",
"summary_type": "concise"
}'curl -X POST "http://localhost:8080/api/extract-actions" \
-H "Content-Type: application/json" \
-d '{
"content": "Your email content here...",
"source": "manual"
}'- Chrome Extension: Load the extension from
frontend/chrome_extension/ - Docker: Run with
docker-compose up - Production: Deploy to cloud with provided configurations
- Customization: Modify AI models in
backend/models/
Port Already in Use
# Find process using port 8080
lsof -i :8080
# Kill the process
kill -9 <PID>Dependencies Not Installing
# Upgrade pip first
pip install --upgrade pip
# Then install requirements
pip install -r requirements.txtVirtual Environment Issues
# Remove and recreate
rm -rf venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt- 📖 Check the main README.md for detailed documentation
- 🐛 Report issues on GitHub
- 💡 Suggest features through GitHub issues
Happy summarizing! 📧✨
curl -X POST "http://localhost:8000/api/health"- Chrome Extension (Development):
- Open Chrome > Extensions > Developer mode
- Click "Load unpacked" > Select
frontend/chrome_extension/ - Visit Gmail or Outlook and test the extension
email_summarizer/
├── backend/ # FastAPI backend
│ ├── main.py # FastAPI app entry point
│ ├── api/ # API routes and schemas
│ ├── models/ # AI models (summarizer, parser)
│ ├── core/ # Configuration
│ └── utils/ # Utility functions
├── frontend/ # Frontend applications
│ ├── streamlit_app.py # Streamlit web app
│ └── chrome_extension/ # Chrome extension
├── requirements.txt # Python dependencies
├── docker-compose.yml # Docker setup
└── README.md # Detailed documentation
Run basic tests:
# Install test dependencies
pip install pytest pytest-asyncio
# Run tests
python -m pytest tests/ -vCreate a .env file in the project root:
ENVIRONMENT=development
SUMMARIZATION_MODEL=facebook/bart-large-cnn
MAX_INPUT_LENGTH=1024
REDIS_URL=redis://localhost:6379
- Default model:
facebook/bart-large-cnn(mock implementation) - To use real models, uncomment the model loading code in
backend/models/summarizer.py - Download models with:
python scripts/download_model.py
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downServices:
- Backend API: http://localhost:8000
- Frontend: http://localhost:8501
- Redis: localhost:6379
-
Backend not starting:
- Check Python version:
python3 --version(requires 3.8+) - Ensure virtual environment is activated
- Check port 8000 isn't in use:
lsof -i :8000
- Check Python version:
-
Streamlit connection error:
- Ensure backend is running first
- Check backend URL in streamlit app (should be localhost:8000)
-
Chrome extension not working:
- Check console for errors (F12 > Console)
- Ensure you're on Gmail or Outlook
- Verify backend is running and accessible
-
Import errors:
- Run from project root directory
- Ensure all dependencies are installed:
pip install -r requirements.txt
Enable debug logging:
# In backend/core/config.py
LOG_LEVEL = "DEBUG"-
Enhance AI Models:
- Integrate real transformer models
- Improve action item extraction
- Add sentiment analysis
-
Add Features:
- User authentication
- Summary history/database
- Email client integrations
- Mobile app
-
Production Deployment:
- Set up proper database (PostgreSQL)
- Configure Redis caching
- Deploy to cloud (AWS, GCP, Azure)
- Set up CI/CD pipeline
- Use the sample email thread to test functionality
- Check the API docs at http://localhost:8000/docs for detailed endpoint information
- Monitor logs for debugging issues
- The Chrome extension works best with Gmail in English
Happy coding! 🎉