File size: 2,354 Bytes
645b70f f678f45 8569e58 a34ff73 8569e58 f678f45 645b70f 8569e58 645b70f 8569e58 645b70f 8569e58 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ---
title: Fraud Guard Intelligence
emoji: ๐ก๏ธ
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.57.0
app_file: app/streamlit_app.py
pinned: true
license: mit
---
# ๐ณ Fraud Guard Intelligence: Adaptive MLOps System
This repository hosts the interactive frontend for a production-ready Fraud Detection system. The architecture is designed to handle non-static fraud patterns through real-time inference, explainable AI, and a human-in-the-loop retraining pipeline.
## ๐ System Architecture
This is a **Microservices-based Deployment**:
1. **Frontend (This Space):** Streamlit UI for transaction input and SHAP-based risk visualization.
2. **Backend (Render/Railway):** FastAPI server handling high-concurrency inference requests.
3. **Data Layer (Neon DB):** PostgreSQL cloud database logging real-time telemetry for drift analysis.
4. **Experiment Tracking (DagsHub/MLflow):** Versioned model registry and performance tracking.
## ๐ง Key Features
- **Explainable AI:** Uses SHAP Waterfall plots to visualize why a specific transaction was flagged.
- **Dynamic Sensitivity:** Stakeholders can adjust the "AI Sensitivity" slider to balance False Positives vs. False Negatives.
- **Drift Monitoring:** Integrated with Evidently AI to detect statistical shifts in incoming data distribution.
- **Auto-Retraining:** Trigger a model refresh directly from the UI when enough human-verified data is collected.
## ๐ ๏ธ Tech Stack
- **Languages:** Python
- **ML Frameworks:** Scikit-Learn, XGBoost (v2.0.3)
- **APIs:** FastAPI, Uvicorn
- **Tracking:** MLflow, DagsHub
- **Database:** SQLAlchemy, PostgreSQL (Neon)
- **Monitoring:** Evidently AI, SHAP
## ๐ Environment Setup
To run this project locally or on your own Space, ensure the following **Secrets** are configured:
- `DATABASE_URL`: Cloud PostgreSQL connection string.
- `API_URL`: The URL of your deployed FastAPI backend.
- `DAGSHUB_USER_TOKEN`: For MLflow logging.
- `MLFLOW_TRACKING_URI`: DagsHub MLflow remote URI.
## ๐ Project Structure
- `app/`: Contains the Streamlit dashboard logic.
- `src/`: Modular code for pipelines (Predict, Train, Drift).
- `artifacts/`: Serialized model files (`.pkl`) and scalers.
- `app.py`: The entry point for Hugging Face deployment.
---
**Author:** Mohit Parmar
**GitHub:** [MohitParmar78](https://github.com/MohitParmar78) |