Lead.AI Fraud Shield

Model repo target: arun-gharami/lead-ai-fraud-shield

Lead.AI Fraud Shield predicts transaction fraud risk for stores, e-commerce, and payment businesses.

Service message: "Check transaction risk before accepting payment."

Business Output

  • Low Risk
  • Medium Risk
  • High Risk

Each prediction returns model confidence and SHAP-style explanation text for top risk drivers.

Features

  • transaction_amount
  • transaction_hour
  • payment_method
  • customer_age
  • account_age_days
  • previous_orders
  • merchant_risk_score
  • device_risk_score
  • location_risk_score

Project Files

  • data/data.csv - synthetic Kaggle-ready dataset
  • dataset/README.md - dataset card
  • train_model.py - training pipeline and metrics export
  • model/model.joblib - serialized model artifact (generated after training)
  • model/metrics.json - evaluation report (generated after training)
  • app.py - Gradio demo for live scoring + CSV upload
  • sample_api_usage.py - API integration example
  • push_to_huggingface.py - publish project to Hugging Face model repo

Local Training

pip install -r requirements.txt
python train_model.py
python app.py

Example Prediction

Input transaction:

{
  "transaction_amount": 1200,
  "transaction_hour": 1,
  "payment_method": "crypto",
  "customer_age": 22,
  "account_age_days": 8,
  "previous_orders": 0,
  "merchant_risk_score": 0.82,
  "device_risk_score": 0.91,
  "location_risk_score": 0.88
}

Output:

{
  "risk_label": "High Risk",
  "confidence": "94.00%",
  "explanation": "Top risk drivers include device score, account age, and payment method risk."
}

Evaluation Snapshot

  • Accuracy: 0.8030
  • Train/Test split: 80/20 stratified
  • Metrics artifact: model/metrics.json

Pricing

  • Starter: $29/month (500 predictions/month)
  • Business: $99/month (CSV upload, dashboard, API access)
  • Custom AI Setup: $499-$1,500 one-time

API Access

Use sample_api_usage.py and replace the endpoint with your Hugging Face Inference Endpoint or Gradio Space URL.

Publish to Hugging Face

export HF_TOKEN=hf_xxx
python push_to_huggingface.py
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collections including arun-gharami/lead-ai-fraud-shield