Afathman's picture
Upload README.md
c4eb6cb verified

A newer version of the Gradio SDK is available: 6.3.0

Upgrade
metadata
title: Email Performance Predictor
emoji: πŸ“§
colorFrom: indigo
colorTo: green
sdk: gradio
sdk_version: 4.25.0
app_file: app.py
pinned: false

πŸš€ Email Performance Predictor - Forks Over Knives

An AI-powered email marketing tool that predicts email performance and provides actionable recommendations based on historical campaign data.

🎯 Features

  • Performance Prediction: Predict open rates, click rates, and unsubscribe rates
  • Sentiment Analysis: Analyze email sentiment using DistilBERT
  • Content Classification: Categorize emails as engaging, promotional, informative, etc.
  • Smart Recommendations: Get actionable tips to improve email performance
  • Real-time Analysis: Instant feedback on your email content

πŸ“Š Model Performance

The app uses machine learning models trained on 311 email campaigns:

  • Click Rate Model: Ridge Regression (RΒ² = 0.28)
  • Open Rate Model: Random Forest (RΒ² = -0.06)
  • Unsubscribe Rate Model: Random Forest (RΒ² = -0.02)

Note: Models show varying performance. Click rate predictions are most reliable.

πŸ› οΈ How to Use

  1. Subject Line: Enter your email subject line
  2. Preview Text: Add preview text (optional)
  3. Campaign Name: Enter your campaign name
  4. Day of Week: Select when you plan to send
  5. Email List: Choose your target audience
  6. Send Time: Specify send time (e.g., "9:00 AM")
  7. Recipients: Enter total recipient count
  8. Target Metric: Choose what you want to optimize for

πŸ“ˆ What You Get

  • Performance Score: 0-100 score based on predicted metrics
  • Sentiment Analysis: Positive/negative sentiment with confidence
  • Content Classification: How your email is categorized
  • Recommendations: Specific tips to improve performance
  • Email Details: Summary of key metrics

πŸ”§ Technical Details

Models Used

  • Sentiment: DistilBERT (Hugging Face)
  • Classification: BART-large-MNLI (Zero-shot)
  • Performance: Custom trained models on campaign data

Features Extracted

  • Text length and word count
  • Punctuation usage (!, ?)
  • Emoji and number counts
  • Capitalization ratio
  • Send timing
  • Audience segmentation

πŸ“ Example Predictions

High-performing email:

  • Subject: "Wrap Up Your Monday with Flavor 🌯πŸ₯‘"
  • Predicted Click Rate: ~1.24%
  • Score: 85/100

Low-performing email:

  • Subject: "Newsletter Update"
  • Predicted Click Rate: ~0.3%
  • Score: 45/100

⚠️ Limitations

  • Models trained on limited dataset (311 campaigns)
  • Performance varies by metric type
  • Predictions are estimates based on historical patterns
  • Best used as guidance alongside marketing expertise

πŸš€ Deployment

This app is designed for Hugging Face Spaces. Upload all files and it will automatically deploy.

Required Files

  • app.py - Main application
  • requirements.txt - Dependencies
  • *.pkl files - Trained models and preprocessors

πŸ“ž Support

For questions about the model or improvements, refer to your campaign data analysis and model training logs.


Built with Gradio, Transformers, and Scikit-learn