FraudLens / README.md
sourize
Initial Commit
30559f0

A newer version of the Streamlit SDK is available: 1.52.2

Upgrade
metadata
title: E-Commerce Fraud Detection
emoji: πŸ›‘οΈ
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.1
app_file: app.py
pinned: false
license: mit
tags:
  - fraud-detection
  - machine-learning
  - streamlit
  - e-commerce
  - security
datasets:
  - fraud-detection-dataset

πŸ›‘οΈ E-Commerce Fraud Detection System

A Streamlit app for real-time e-commerce fraud detection using machine learning and explainable AI.

πŸš€ Features

  • Real-time fraud risk assessment
  • Explainable AI (feature impact)
  • Interactive analytics dashboard
  • Modular, production-ready code

πŸ—οΈ Project Structure

app.py
pages/
  home.py
  fraud_detection.py
  model_insights.py
  analytics_dashboard.py
utils/
  model_utils.py
  preprocessing.py
  visualization.py
requirements.txt
lightgbm_model.pkl
customer_loc.pkl

βš™οΈ Configuration

Hugging Face Space Configuration

For optimal deployment on Hugging Face Spaces, ensure your repository includes:

Space Metadata (README.md)

---
title: E-Commerce Fraud Detection
emoji: πŸ›‘οΈ
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.28.1
app_file: app.py
pinned: false
license: mit
---

Space Configuration (README.md)

Add this section to your README for better Space discovery: ```yaml

tags: - fraud-detection - machine-learning - streamlit - e-commerce - security datasets: - fraud-detection-dataset


## πŸ§‘β€πŸ’» Local Development
1. Install dependencies:
   ```bash
   pip install -r requirements.txt
  1. Run the app:
    streamlit run app.py
    

🐳 Docker Deployment

You can also run this app in a Docker container:

  1. Build the Docker image:
    docker build -t fraudlens-app .
    
  2. Run the container:
    docker run -p 8501:8501 fraudlens-app
    

The app will be available at http://localhost:8501.

🌐 Deploy on Hugging Face Spaces

  1. Push this repo (with all files, including .pkl models) to a public GitHub repository.
  2. Create a new Space on Hugging Face Spaces and select Streamlit as the SDK.
  3. In "Repository URL", enter your GitHub repo URL.
  4. The app will build and deploy automatically!

Note: For Docker-based Spaces, select the Docker SDK and ensure your Dockerfile is present in the repo.

Space Configuration Files

  • app.py: Main Streamlit application entry point
  • requirements.txt: Python dependencies
  • Dockerfile: For Docker-based deployment
  • README.md: Space metadata and documentation

πŸ“¦ Requirements

All dependencies are listed in requirements.txt.

πŸ“„ License

MIT