""" DemandScape Suite โ Unified Gradio App ======================================= Four products, one app, one API key: ๐ DemandScape โ Probabilistic demand forecasting across scenarios ๐ค PartnerScape โ Partner win-rate, bookings & effectiveness prediction ๐ฏ DealScape โ Opportunity win-rate, pipeline health & SHAP explainability ๐ก๏ธ ObjectionScape โ Objection classification, severity & deal-outcome prediction All inference is routed through the fly.dev orchestrator (FLYIO_ENDPOINT env var). A single DemandScape Suite API key authenticates every product โ no HuggingFace token needed in the front-end. """ import os import gradio as gr # โโ Product modules โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ import demandscape import dealscape import objectionscape import partnerscape # --------------------------------------------------------------------------- # Configuration # --------------------------------------------------------------------------- FLYIO_ENDPOINT = os.getenv( "FLYIO_ENDPOINT", "https://demandscape-orchestrator.fly.dev/v1/infer", ) # --------------------------------------------------------------------------- # Custom CSS (shared across all tabs) # --------------------------------------------------------------------------- custom_css = """ /* โโ Suite header โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */ .suite-title { text-align: center; font-size: 42px; font-weight: bold; color: #1f77b4; margin-bottom: 6px; } .suite-subtitle { text-align: center; font-size: 20px; color: #555; margin-bottom: 22px; } /* โโ API-key notice banner โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */ .api-key-notice { background: linear-gradient(135deg, #fff3cd, #ffeaa7); border: 2px solid #f39c12; border-radius: 10px; padding: 16px 22px; margin: 12px 0 16px 0; font-size: 15px; text-align: center; } /* โโ Table header wrapping fix โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */ table thead th { white-space: normal !important; height: auto !important; min-height: 50px !important; vertical-align: middle !important; padding: 8px !important; line-height: 1.4 !important; } table td { white-space: nowrap !important; padding: 8px !important; } """ # --------------------------------------------------------------------------- # Build the unified app # --------------------------------------------------------------------------- with gr.Blocks(title="DemandScape Suite", css=custom_css) as demo: # โโ Suite header โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ with gr.Row(): with gr.Column(scale=1): gr.Markdown("### Consultant: Diskover Analytics") gr.Image("Diskover Analytics.png", label="", show_label=False, height=100) with gr.Column(scale=2): gr.HTML('