Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.5.1
A/B Test Predictor - Quick Start Guide
π Get Started in 3 Steps
1. Install
pip install gradio-client
2. Predict
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
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
{
"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
- Upload images
- Select categories
- Click "Predict"
- Get instant results!
π Full Documentation
For complete API reference, error handling, and advanced examples:
π See API_DOCUMENTATION.md
Need Help? Check Common Issues in the full docs.