--- title: Blocks AI Assistant emoji: ๐Ÿข colorFrom: red colorTo: red sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false --- # Blocks Assistant โ€“ Hybrid AI + Analytics This Space hosts a fully self-contained AI Operations Assistant built for backlog mitigation, block analysis, and fiscal-quarter trend detection. ### Key Capabilities - ๐Ÿ“Š Block summary (Pricing, Credit, Delivery, Ship Debit) - ๐Ÿงฎ Customer exposure analytics - ๐Ÿ” Dynamic FAQ learning based on user queries - ๐Ÿงฑ Multiple block order detection - ๐Ÿ“… Fiscal-year quarter-wise trend insights (Aprโ€“Mar FY) - ๐Ÿง  Phi-2 LLM rewriting layer for polished operational insights - ๐Ÿ”’ Zero external APIs โ€“ all analytics & AI happen inside the Space ### How it works 1. Upload your backlog file: **Backlog_updated.xlsx** (required) 2. The assistant computes analytics: - Block exposure - Order-level details - Highest exposure customers - Multi-block orders - FY quarter trends 3. The LLM refines the insights: - Business-professional tone - Zero hallucinations (numbers are not changed) - Concise operations-style recommendations ### Technology Stack - Flask backend - Pandas for analytics - Transformers + Torch (Phi-2 model) - HTML + JS + CSS frontend (custom UI) - Runs fully on CPU ### No external API calls - No OpenAI - No remote LLMs - No data leaves Hugging Face Designed for operational reliability. Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference