Skip to content

Satyam1Vishwakarma/chatdrive-ml

Repository files navigation

🚦 Chatdrive-ML

🔒 Malicious URL Detection API and ML Pipeline

🧪 Run the full notebook on Kaggle: Malicious URL ML (Kaggle)

Frontend Repo: chatdrive

🌐 Live Demo

Try the live application here: 🔗 ChatDrive

📝 Overview

This project provides a FastAPI-based web service and a machine learning pipeline for detecting potentially malicious URLs.

💬 It is designed to integrate with a chatting website, enabling real-time detection of malicious URLs shared in conversations.

It includes:

  • 🔗 A REST API for URL analysis and prediction
  • 🧩 Feature extraction and model inference using pandas and joblib
  • 📓 A Jupyter notebook for model training and evaluation

🛠️ Tech Stack

  • 🐍 Python: 3.11.13
  • ⚡ FastAPI: Web API framework
  • 📊 pandas, numpy: Data processing
  • 📦 joblib: Model serialization
  • 🤖 scikit-learn: ML pipeline (used in notebook)
  • ✅ pydantic: Data validation
  • 🌐 CORS: Enabled for API

⚙️ Installation

  1. Clone the repository:
    git clone https://github.com/Satyam1Vishwakarma/chatdrive-ml.git
    cd chatdrive-ml
  2. Install dependencies:
    pip install -r requirements.txt

🚀 Usage

▶️ Run the API server

uvicorn app:app --reload

The API will be available at http://localhost:8000.

🔗 API Endpoint

  • POST /predict — Accepts a URL and returns a prediction (malicious or not).

📊 Model Training Offline

See malicious-url-ml.ipynb for the full ML workflow: data loading, feature engineering, model training, evaluation, and export.

📁 File Structure

  • app.py — FastAPI app and feature extraction
  • malicious-url-ml.ipynb — Jupyter notebook for ML pipeline
  • static/ — Pretrained model files (url_model.pkl, etc.)
  • requirements.txt — Python dependencies
  • version.txt — Python version

About

chatdrive bad url detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors