When you click Analyze frame, the app captures one webcam frame and runs a multi-agent pipeline on Gemma 4 (31B, multimodal) via Cerebras:

  1. Three specialist agents run in parallel (asyncio.gather), each a separate Gemma 4 vision call on the same frame:
    • Identifier — names the plant species / closest type.
    • SymptomScanner — reports only visible problems (yellowing, spots, wilting, pests, mold…).
    • DiagnosisGuide — receives the frame plus a reference chart (reference.jpg, a symptom → cause → fix guide) and matches symptoms to the most likely cause + one care action.
  2. A coordinator agent (text-only Gemma 4 call) takes the three opinions, resolves disagreements, and produces the final diagnosis and a one-sentence spoken recommendation.
  3. The UI shows each agent's verdict (with per-agent latency), a big decision banner, and speaks the recommendation aloud via the Web Speech API.

The centerpiece: speed comparison

Each result is shown in two panels driven by the same data:

  • Cerebras (live) — rendered the instant the response returns.
  • GPU baseline (simulated) — the same result throttled to ~100 tokens/sec (~2–3s/decision), clearly labeled simulated, so the audience can see how much faster Cerebras is.

Robustness

  • Per-agent fault isolation + timeouts — a failed or slow agent shows "agent error" in its card; the rest of the pipeline keeps going.
  • No-webcam fallback — if the camera is unavailable, it loops over sample images in static/samples/.
  • One request per click — no constant polling; the app makes a single API call on demand.

Built With

Share this project:

Updates