Building Fast AI Decision Systems with LAYA & Streamlit (Video Tutorial + GitHub Repo)

Hey Streamlit Community! :waving_hand:

I’m excited to share a practical video tutorial exploring how to combine Streamlit with LAYA—a lightweight, open-source System 1 decision engine designed specifically for fast classification and routing without the heavy latency and cost of generative LLMs.

:globe_with_meridians: Cross-Language Accessibility (Spanish & English)

A quick note on language: The original video was recorded in Spanish, but thanks to YouTube’s automatic multi-language AI audio track, an English dub is available directly within the player! If you prefer English, simply head to the video settings (:gear:) on YouTube, select Audio track, and switch to English.


:light_bulb: What You’ll Learn in This Tutorial

Generative models like GPT or Claude are incredible, but when your application needs real-time categorization—such as routing customer feedback, assessing churn risk, or tagging support tickets—a dedicated decision model running locally can be faster, cheaper, and more predictable.

In this walkthrough, you’ll see how to:

  • Configure LAYA’s Decision Engine: Set up native evaluation types including categorical choices (choice), sentiment scores (score), and boolean risk probabilities (nou1).
  • Build an Interactive Streamlit UI: Input raw text or multi-line batches, dynamically adjust risk thresholds using st.slider, and visualize progress with st.progress.
  • Handle Multi-language Inputs: Leverage LAYA’s multilingual routing checkpoints (supporting over 100+ languages) with automated fallback logic for edge cases.
  • Display Rich Insights: Present structured summaries with pandas DataFrames and use conditional styling/metrics (st.metric) to surface critical alerts instantly.

:link: Resources & Code


Whether you’re dealing with high-throughput text processing, optimizing costs for internal tools, or simply looking to build clean dashboards for decision AI, we hope this walkthrough sparks some ideas for your next app.

Feel free to try it out, fork the code, and drop any questions, suggestions, or feedback below. We’d love to hear how you handle decision workflows in your own Streamlit projects! :rocket:

2 Likes