CoolFace
Apppublic

asif-nawaz-ml/network-security-phishing

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

๐Ÿ” Network Security - Phishing Detection System

Python FastAPI MongoDB Accuracy

๐Ÿ“‹ Project Overview

An end-to-end Machine Learning project that detects phishing websites using network security features. Built with a complete MLOps pipeline.

๐Ÿ—๏ธ Project Architecture

MongoDB Atlas โ†’ Data Ingestion โ†’ Data Validation โ†’ Data Transformation โ†’ Model Trainer โ†’ FastAPI App

๐Ÿ“Š Dataset

  • โ€”Source: Phishing Website Dataset
  • โ€”Rows: 11,055
  • โ€”Features: 30 network security features
  • โ€”Target: Result (Phishing or Legitimate)

๐ŸŽฏ Model Performance

MetricTrainTest
Accuracy98.78%97.31%
Precision98.78%97.32%
Recall98.78%97.31%
F1 Score98.78%97.31%

๐Ÿ”ง Tech Stack

  • โ€”Language: Python 3.10
  • โ€”ML: Scikit-learn, XGBoost
  • โ€”Database: MongoDB Atlas
  • โ€”API: FastAPI
  • โ€”Preprocessing: KNN Imputer, Robust Scaler, SMOTETomek
  • โ€”Deployment: Hugging Face Spaces (Docker)
  • โ€”CI/CD: GitHub Actions

๐Ÿ“ Project Structure

NetworkSecurity/ โ”œโ”€โ”€ networksecurity/ โ”‚ โ”œโ”€โ”€ components/ โ”‚ โ”‚ โ”œโ”€โ”€ dataingestion.py โ”‚ โ”‚ โ”œโ”€โ”€ datavalidation.py โ”‚ โ”‚ โ”œโ”€โ”€ datatransformation.py โ”‚ โ”‚ โ””โ”€โ”€ modeltrainer.py โ”‚ โ”œโ”€โ”€ entity/ โ”‚ โ”‚ โ”œโ”€โ”€ configentity.py โ”‚ โ”‚ โ””โ”€โ”€ artifactentity.py โ”‚ โ”œโ”€โ”€ pipeline/ โ”‚ โ”‚ โ””โ”€โ”€ training_pipeline.py โ”‚ โ”œโ”€โ”€ exception/ โ”‚ โ”œโ”€โ”€ logging/ โ”‚ โ””โ”€โ”€ utils/ โ”œโ”€โ”€ templates/ โ”‚ โ””โ”€โ”€ index.html โ”œโ”€โ”€ app.py โ”œโ”€โ”€ Dockerfile โ”œโ”€โ”€ requirements.txt โ””โ”€โ”€ schema.yaml

๐Ÿš€ How to Run Locally

1. Clone Repository

bash
git clone https://github.com/Asif5588-M/NetworkSecurity.git
cd NetworkSecurity

2. Create Environment

bash
conda create -n networksecurity python=3.10 -y
conda activate networksecurity

3. Install Dependencies

bash
pip install -r requirements.txt

4. Set Environment Variables

bash
MONGODB_URL="your-mongodb-url"

5. Run App

bash
python app.py

6. Open Browser

http://localhost:7860

๐ŸŒ Live Demo

Hugging Face Space

๐Ÿ‘จโ€๐Ÿ’ป Author

Asif Malik