File size: 2,632 Bytes
5b49b49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# A/B Test Predictor - Quick Start Guide

## πŸš€ Get Started in 3 Steps

### 1. Install

```bash
pip install gradio-client
```

### 2. Predict

```python
from gradio_client import Client

client = Client("SpiralyzeLLC/ABTestPredictor")

result = client.predict(
    "control.jpg",           # Your control image
    "variant.jpg",           # Your variant image
    "SaaS",                  # Business Model
    "B2B",                   # Customer Type
    "High-Intent Lead Gen",  # Conversion Type
    "B2B Software & Tech",   # Industry
    "Awareness & Discovery", # Page Type
    api_name="/predict_with_categorical_data"
)
```

### 3. View Results

```python
print(f"Win Probability: {result['predictionResults']['probability']}")
print(f"Confidence: {result['predictionResults']['modelConfidence']}%")

if float(result['predictionResults']['probability']) > 0.5:
    print("πŸŽ‰ Variant predicted to WIN!")
else:
    print("⚠️ Control predicted to win")
```

## πŸ“‹ Input Parameters

| Parameter | Values |
|-----------|--------|
| **Business Model** | `E-Commerce`, `Lead Generation`, `Other*`, `SaaS` |
| **Customer Type** | `B2B`, `B2C`, `Both`, `Other*` |
| **Conversion Type** | `Direct Purchase`, `High-Intent Lead Gen`, `Info/Content Lead Gen`, `Location Search`, `Non-Profit/Community`, `Other Conversion` |
| **Industry** | `Automotive & Transportation`, `B2B Services`, `B2B Software & Tech`, `Consumer Services`, `Consumer Software & Apps`, `Education`, `Finance, Insurance & Real Estate`, `Food, Hospitality & Travel`, `Health & Wellness`, `Industrial & Manufacturing`, `Media & Entertainment`, `Non-Profit & Government`, `Other`, `Retail & E-commerce` |
| **Page Type** | `Awareness & Discovery`, `Consideration & Evaluation`, `Conversion`, `Internal & Navigation`, `Post-Conversion & Other` |

## πŸ“Š Response

```json
{
  "predictionResults": {
    "probability": "0.682",          // >0.5 = Variant wins
    "modelConfidence": "66.1",       // Accuracy % for this category
    "trainingDataSamples": 14634,    // Training data size
    "totalPredictions": 1626,        // Total test predictions
    "correctPredictions": 1074       // Correct predictions
  }
}
```

## 🌐 Or Use Web Interface

Visit: **https://huggingface.co/spaces/SpiralyzeLLC/ABTestPredictor**

1. Upload images
2. Select categories
3. Click "Predict"
4. Get instant results!

## πŸ“– Full Documentation

For complete API reference, error handling, and advanced examples:

πŸ‘‰ See **[API_DOCUMENTATION.md](API_DOCUMENTATION.md)**

---

**Need Help?** Check [Common Issues](API_DOCUMENTATION.md#-common-issues) in the full docs.