Views
No views yet
arun-gharami/lead-ai-fraud-shieldLow RiskMedium RiskHigh Risktransaction_amounttransaction_hourpayment_methodcustomer_ageaccount_age_daysprevious_ordersmerchant_risk_scoredevice_risk_scorelocation_risk_scoredata/data.csv - synthetic Kaggle-ready datasetdataset/README.md - dataset cardtrain_model.py - training pipeline and metrics exportmodel/model.joblib - serialized model artifact (generated after training)model/metrics.json - evaluation report (generated after training)app.py - Gradio demo for live scoring + CSV uploadsample_api_usage.py - API integration examplepush_to_huggingface.py - publish project to Hugging Face model repo1pip install -r requirements.txt
2python train_model.py
3python app.py1{
2 "transaction_amount": 1200,
3 "transaction_hour": 1,
4 "payment_method": "crypto",
5 "customer_age": 22,
6 "account_age_days": 8,
7 "previous_orders": 0,
8 "merchant_risk_score": 0.82,
9 "device_risk_score": 0.91,
10 "location_risk_score": 0.88
11}1{
2 "risk_label": "High Risk",
3 "confidence": "94.00%",
4 "explanation": "Top risk drivers include device score, account age, and payment method risk."
5}0.803080/20 stratifiedmodel/metrics.jsonsample_api_usage.py and replace the endpoint with your Hugging Face Inference Endpoint or Gradio Space URL.1export HF_TOKEN=hf_xxx
2python push_to_huggingface.py