File size: 2,016 Bytes
3873e40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
language: en
tags:
- tabular-classification
- churn-prediction
- lead-scoring
- lead-ai
- scikit-learn
license: apache-2.0
library_name: scikit-learn
pipeline_tag: tabular-classification
---

# Lead.AI Customer Predictor

Model repo target: `arun-gharami/lead-ai-customer-predictor`

Lead.AI Customer Predictor classifies customer quality and churn likelihood for salons, stores, agencies, and small businesses.

Service message: **"Find which customers are likely to buy again."**

## Business Output

- `Hot Lead`
- `Normal Lead`
- `Churn Risk`

Use this output to prioritize outreach, automate nurture campaigns, and export scored leads to CRM.

## Features

- `customer_tenure`
- `total_spent`
- `last_purchase_days`
- `visit_count`
- `email_open_rate`
- `discount_usage`
- `support_tickets`
- `satisfaction_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

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

## Sample API Payload

```json
{
  "customer_tenure": 24,
  "total_spent": 3400,
  "last_purchase_days": 8,
  "visit_count": 42,
  "email_open_rate": 0.76,
  "discount_usage": 0.12,
  "support_tickets": 0,
  "satisfaction_score": 9.1
}
```

## Evaluation Snapshot

- Accuracy: `0.8267`
- Train/Test split: `80/20` stratified
- Metrics artifact: `model/metrics.json`

## Pricing

- Starter: **$49/month**
- Business: **$149/month** with CRM export + team workflows
- Custom AI Setup: **$499-$1,500** one-time

## Publish to Hugging Face

```bash
export HF_TOKEN=hf_xxx
python push_to_huggingface.py
```