Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# ๐ฅ Death Legion Fraud Detection System
|
| 2 |
|
| 3 |
<p align="center">
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
</p>
|
| 9 |
|
| 10 |
## ๐ฏ Overview
|
| 11 |
|
| 12 |
Welcome to the **Death Legion Fraud Detection System** - a state-of-the-art machine learning solution for real-time credit card fraud detection. Built by the **Best Teams** with cutting-edge Random Forest technology, this model achieves exceptional performance on highly imbalanced financial datasets.
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
## โก Key Features
|
| 15 |
|
| 16 |
- **๐ก๏ธ Advanced Random Forest Architecture**: 500 estimators with optimized depth
|
|
@@ -39,52 +67,50 @@ Random Forest Classifier
|
|
| 39 |
โโโ Format: Safetensors (6.12 MB)
|
| 40 |
```
|
| 41 |
|
| 42 |
-
##
|
| 43 |
-
|
| 44 |
-
### Installation
|
| 45 |
-
|
| 46 |
-
```bash
|
| 47 |
-
pip install safetensors numpy pandas scikit-learn
|
| 48 |
-
```
|
| 49 |
|
| 50 |
-
###
|
| 51 |
|
| 52 |
-
|
| 53 |
-
from safetensors.numpy import load_file
|
| 54 |
-
import numpy as np
|
| 55 |
|
| 56 |
-
|
| 57 |
-
tensors = load_file("fraud_detector.safetensors")
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
|
| 64 |
-
###
|
| 65 |
|
| 66 |
```python
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
# Load and predict using the inference script
|
| 71 |
-
from inference import load_artifacts_safetensors, predict
|
| 72 |
|
| 73 |
-
model
|
| 74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
|
|
|
| 78 |
```
|
| 79 |
|
| 80 |
## ๐ Repository Structure
|
| 81 |
|
| 82 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
Pnny13/fraud-detection-model/
|
| 84 |
-
โโโ fraud_detector.safetensors
|
| 85 |
-
โโโ scaler.joblib
|
| 86 |
-
โโโ inference.py
|
| 87 |
-
โโโ README.md
|
| 88 |
```
|
| 89 |
|
| 90 |
## ๐ฌ Technical Details
|
|
@@ -118,13 +144,13 @@ Try the live interactive demo at: **https://huggingface.co/spaces/Pnny13/fraud-d
|
|
| 118 |
## ๐ค Credits
|
| 119 |
|
| 120 |
<p align="center">
|
| 121 |
-
|
| 122 |
-
|
| 123 |
</p>
|
| 124 |
|
| 125 |
<p align="center">
|
| 126 |
-
|
| 127 |
-
|
| 128 |
</p>
|
| 129 |
|
| 130 |
## ๐ License
|
|
@@ -137,8 +163,6 @@ This model is released under the MIT License. Use responsibly for fraud detectio
|
|
| 137 |
- ๐ Space: https://huggingface.co/spaces/Pnny13/fraud-detection-space
|
| 138 |
- ๐ Dataset: https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud
|
| 139 |
|
| 140 |
-
---
|
| 141 |
-
|
| 142 |
<p align="center">
|
| 143 |
-
|
| 144 |
-
</p>
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "Death Legion Fraud Detection"
|
| 3 |
+
emoji: "๐ฅ"
|
| 4 |
+
colorFrom: "red"
|
| 5 |
+
colorTo: "red"
|
| 6 |
+
sdk: "gradio"
|
| 7 |
+
sdk_version: "4.19.0"
|
| 8 |
+
python_version: "3.10"
|
| 9 |
+
app_file: "app.py"
|
| 10 |
+
pinned: false
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
# ๐ฅ Death Legion Fraud Detection System
|
| 14 |
|
| 15 |
<p align="center">
|
| 16 |
+
<img src="https://img.shields.io/badge/Death%20Legion-Powered-red?style=for-the-badge&logo=skull" alt="Death Legion">
|
| 17 |
+
<img src="https://img.shields.io/badge/Best%20Teams-Elite-gold?style=for-the-badge&logo=crown" alt="Best Teams">
|
| 18 |
+
<img src="https://img.shields.io/badge/AUPRC-0.8177-success?style=for-the-badge" alt="AUPRC">
|
| 19 |
+
<img src="https://img.shields.io/badge/Model%20Size-6.12MB-blue?style=for-the-badge" alt="Size">
|
| 20 |
</p>
|
| 21 |
|
| 22 |
## ๐ฏ Overview
|
| 23 |
|
| 24 |
Welcome to the **Death Legion Fraud Detection System** - a state-of-the-art machine learning solution for real-time credit card fraud detection. Built by the **Best Teams** with cutting-edge Random Forest technology, this model achieves exceptional performance on highly imbalanced financial datasets.
|
| 25 |
|
| 26 |
+
## ๐ Deploy This Space
|
| 27 |
+
|
| 28 |
+
<p align="center">
|
| 29 |
+
<a href="https://huggingface.co/spaces/Pnny13/fraud-detection-space?duplicate=true">
|
| 30 |
+
<img src="https://img.shields.io/badge/๐%20Deploy%20to%20HF-Spaces-blue?style=for-the-badge" alt="Deploy to Hugging Face">
|
| 31 |
+
</a>
|
| 32 |
+
</p>
|
| 33 |
+
|
| 34 |
+
## ๐ฎ Use This Model
|
| 35 |
+
|
| 36 |
+
<p align="center">
|
| 37 |
+
<a href="https://huggingface.co/Pnny13/fraud-detection-model">
|
| 38 |
+
<img src="https://img.shields.io/badge/๐ค%20Use%20This%20Model-Hugging%20Face-yellow?style=for-the-badge" alt="Use This Model">
|
| 39 |
+
</a>
|
| 40 |
+
</p>
|
| 41 |
+
|
| 42 |
## โก Key Features
|
| 43 |
|
| 44 |
- **๐ก๏ธ Advanced Random Forest Architecture**: 500 estimators with optimized depth
|
|
|
|
| 67 |
โโโ Format: Safetensors (6.12 MB)
|
| 68 |
```
|
| 69 |
|
| 70 |
+
## ๐ How to Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
### Quick Start
|
| 73 |
|
| 74 |
+
1. **Access the Live Demo**: Visit [https://huggingface.co/spaces/Pnny13/fraud-detection-space](https://huggingface.co/spaces/Pnny13/fraud-detection-space)
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
2. **Enter Transaction Features**: Input the 30 features (V1-V28, Time, Amount) from your credit card transaction
|
|
|
|
| 77 |
|
| 78 |
+
3. **Get Instant Prediction**: The system will return:
|
| 79 |
+
- Fraud probability score (0-100%)
|
| 80 |
+
- Binary classification (Fraud/Legitimate)
|
| 81 |
+
- Recommendation for action
|
| 82 |
|
| 83 |
+
### Programmatic Usage
|
| 84 |
|
| 85 |
```python
|
| 86 |
+
from safetensors.numpy import load_file
|
| 87 |
+
import numpy as np
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
# Load model from Hugging Face Hub
|
| 90 |
+
from huggingface_hub import hf_hub_download
|
| 91 |
+
model_path = hf_hub_download(
|
| 92 |
+
repo_id="Pnny13/fraud-detection-model",
|
| 93 |
+
filename="fraud_detector.safetensors"
|
| 94 |
+
)
|
| 95 |
|
| 96 |
+
# Load and predict
|
| 97 |
+
tensors = load_file(model_path)
|
| 98 |
+
# ... use model for predictions
|
| 99 |
```
|
| 100 |
|
| 101 |
## ๐ Repository Structure
|
| 102 |
|
| 103 |
```
|
| 104 |
+
Pnny13/fraud-detection-space/
|
| 105 |
+
โโโ app.py # Gradio application
|
| 106 |
+
โโโ requirements.txt # Python dependencies
|
| 107 |
+
โโโ README.md # Documentation
|
| 108 |
+
|
| 109 |
Pnny13/fraud-detection-model/
|
| 110 |
+
โโโ fraud_detector.safetensors # Trained model
|
| 111 |
+
โโโ scaler.joblib # Feature scaler
|
| 112 |
+
โโโ inference.py # Prediction script
|
| 113 |
+
โโโ README.md # Model documentation
|
| 114 |
```
|
| 115 |
|
| 116 |
## ๐ฌ Technical Details
|
|
|
|
| 144 |
## ๐ค Credits
|
| 145 |
|
| 146 |
<p align="center">
|
| 147 |
+
<strong>Powered by Death Legion</strong><br>
|
| 148 |
+
<em>Elite Machine Learning Division</em>
|
| 149 |
</p>
|
| 150 |
|
| 151 |
<p align="center">
|
| 152 |
+
<strong>Best Teams Collaboration</strong><br>
|
| 153 |
+
<em>Excellence in AI Engineering</em>
|
| 154 |
</p>
|
| 155 |
|
| 156 |
## ๐ License
|
|
|
|
| 163 |
- ๐ Space: https://huggingface.co/spaces/Pnny13/fraud-detection-space
|
| 164 |
- ๐ Dataset: https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud
|
| 165 |
|
|
|
|
|
|
|
| 166 |
<p align="center">
|
| 167 |
+
<sub>Built with ๐ฅ by Death Legion | Best Teams Elite Division</sub>
|
| 168 |
+
</p>
|