# 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.