Skip to content

Add Streamlit results dashboard for the pipeline - #14

Merged
hemanthrayuduu merged 2 commits into
mainfrom
claude/docuparse-system-review-ad2jt0
Jul 27, 2026
Merged

Add Streamlit results dashboard for the pipeline#14
hemanthrayuduu merged 2 commits into
mainfrom
claude/docuparse-system-review-ad2jt0

Conversation

@hemanthrayuduu

Copy link
Copy Markdown
Member

Summary

Adds an interactive results dashboard that visualizes what the DocuParse pipeline produces — evaluation metrics, per-stage benchmarks, build-vs-buy cost analysis, distribution drift, and the analysis reports.

It reads the pipeline's already-committed JSON/markdown outputs and does not re-run extraction, so it's lightweight and fully independent of the heavy stack (torch / Docling / layout models / OCR).

Why a dashboard and not a live "upload a PDF" demo

The extraction stack is heavy and takes minutes per document, which is a poor fit for an always-on hosted demo (and unreliable — the committed benchmark even shows a stage failure on one run). The dashboard focuses on the recorded results, which is the efficient, robust option. A live-parse tab could be added later behind a Docker image if desired.

What's included

  • dashboard/data_loader.py — pure-stdlib loaders/transforms (no Streamlit/pandas) for metrics, benchmarks, cost analysis, drift, and reports. Dependency-free so it's unit-testable.
  • dashboard/app.py — Streamlit UI with five views: Overview, Benchmarks, Cost (Build vs Buy), Distribution Drift, Reports. Recorded benchmark failures are surfaced honestly rather than hidden, and the small/hand-built eval set is flagged as directional.
  • requirements-dashboard.txtstreamlit / plotly / pandas only, so it can run and deploy on its own (e.g. Streamlit Community Cloud).
  • tests/unit/test_dashboard_data.py — unit tests for the loader against synthetic fixtures and the real committed data.
  • README — how to run (streamlit run dashboard/app.py) and deploy.

How to run

pip install -r requirements-dashboard.txt
streamlit run dashboard/app.py   # http://localhost:8501

Testing

  • All 25 unit tests pass (python -m pytest) — 15 existing + 10 new, and the loader tests run without the dashboard deps (so the fast CI gate covers them).
  • All five dashboard pages render without exceptions, verified headlessly via Streamlit's AppTest harness; migrated to the current width="stretch" API so there are no deprecation warnings.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 27, 2026 15:51
Adds an interactive dashboard that visualizes the pipeline's recorded outputs
without re-running the heavy extraction stack:

- dashboard/data_loader.py: pure-stdlib loaders/transforms for the committed
  evaluation metrics, per-stage benchmarks, cost analysis, drift data, and
  reports. Kept dependency-free so it is unit-testable.
- dashboard/app.py: Streamlit UI with Overview / Benchmarks / Cost (Build vs
  Buy) / Distribution Drift / Reports views. Recorded benchmark failures are
  surfaced honestly rather than hidden.
- requirements-dashboard.txt: lightweight deps (streamlit, plotly, pandas)
  independent of torch/docling, so the dashboard can run/deploy on its own.
- tests/unit/test_dashboard_data.py: unit tests for the loader against both
  synthetic fixtures and the real committed data.
- README: how to run and deploy the dashboard.

A live "upload a PDF and parse" demo is intentionally omitted — the extraction
stack is heavy and slow to host; the dashboard focuses on produced results.

Verified: all 25 unit tests pass; all five dashboard pages render without
exceptions via Streamlit's headless AppTest harness.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D68SAeZ9GofWeNdMwvuDwC
Makes the dashboard deployable to Streamlit Community Cloud without pulling in
the heavy pipeline dependencies:

- dashboard/requirements.txt: light deps (streamlit, plotly, pandas) placed next
  to the entrypoint. Community Cloud searches the entrypoint's directory before
  the repo root and uses the first dependency file it finds, so this is used
  instead of the heavy root requirements.txt.
- .streamlit/config.toml: theme + server config at the repo root, which is where
  Community Cloud reads config from when the entrypoint is in a subdirectory.
- Remove the now-redundant root requirements-dashboard.txt (single source of
  truth is dashboard/requirements.txt).
- README: step-by-step Community Cloud deploy instructions and an explanation of
  the dependency-resolution behavior.

Verified: config.toml parses, the app renders with it via AppTest, and all 25
unit tests still pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D68SAeZ9GofWeNdMwvuDwC
@hemanthrayuduu
hemanthrayuduu merged commit 32c4d5d into main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants