Spandan-Satapute/ai-email-security-system
0
๐ AI Email Security System
An intelligent AI-powered system that detects spam emails and evaluates their risk levels using machine learning. Built as a real-world OpenEnv environment, where an agent learns step-by-step through tasks.
๐ฅ Live Demo
๐ https://huggingface.co/spaces/Spandan-Satapute/ai-email-security-system-v2
๐ง Problem Statement
Spam emails and phishing attacks are growing rapidly. Traditional systems only classify spam but do not provide:
- Risk level assessment
- Confidence scoring
- Explanation
This project solves that by building a complete AI environment.
๐ก Solution
This system:
- Detects spam emails
- Classifies risk (Low / Medium / High)
- Gives confidence score
- Provides explanation
- Simulates agent learning with multi-step tasks
โ๏ธ Features
- โ Spam Detection (ML based)
- โ Risk Level Classification
- โ Confidence Scoring
- โ Explanation Generation
- โ Multi-Step OpenEnv Environment
- โ FastAPI Backend
- โ Docker Deployment
- โ Live Hosted on Hugging Face
๐๏ธ System Architecture
- Model โ TF-IDF + Naive Bayes
- Backend โ FastAPI
- Environment โ Custom OpenEnv
- Deployment โ Docker + Hugging Face
๐ค OpenEnv Tasks
๐ข Easy
- Detect spam or not
๐ก Medium
- Classification + confidence
๐ด Hard
- Risk level + explanation
๐ Reward is calculated based on:
- Accuracy
- Confidence
- Risk detection
๐ API Endpoints
๐งช Example Input
{
"text": "Win a free lottery now!!!"
}
๐ Example Output
JSON
{
"intent": "spam",
"confidence": 0.92,
"risk_level": "high",
"explanation": "Suspicious or harmful content detected",
"score": 1.0
}
๐ณ Deployment
This project is fully containerized using Docker and deployed on Hugging Face Spaces.
๐ฆ Tech Stack
Python
FastAPI
Scikit-learn
Docker
Hugging Face Spaces
๐จโ๐ป Author
Spandan Satapute
CSE Student | AI Developer