demo = gr.Interface( fn=predict_fraud, inputs=[ gr.Number(label="Transaction Amount ($)", value=750), gr.Slider(0, 23, value=2, step=1, label="Transaction Hour"), gr.Radio(["online", "in_store"], label="Transaction Type", value="online"), gr.Slider(0, 1, value=0.75, step=0.01, label="Merchant Risk Score"), gr.Number(label="Customer Age", value=28), gr.Number(label="Previous Transactions", value=5), ], outputs=[ gr.Label(label="Prediction"), gr.Textbox(label="Explainability Summary") ], title="🛡️ Lead.AI Labs — Explainable Fraud Detection", description=""" Interactive AI demo for fraud risk analysis using transparent scoring and explainable AI principles. This tool estimates transaction fraud risk and explains the main factors behind the prediction. """, theme=gr.themes.Soft() ) demo.launch()