Skip to content

feat: showcase typed spans in Streamlit demo#72

Open
w3lld1 wants to merge 1 commit into
KRLabsOrg:mainfrom
w3lld1:feat/typed-span-streamlit-demo
Open

feat: showcase typed spans in Streamlit demo#72
w3lld1 wants to merge 1 commit into
KRLabsOrg:mainfrom
w3lld1:feat/typed-span-streamlit-demo

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 10, 2026

Copy link
Copy Markdown

Summary

  • replace the demo's developer-local checkpoint with a fresh-clone-compatible v2 encoder cascade
  • add a cached sidebar selector for typed and binary models
  • color typed spans by taxonomy category and show category, subcategory, and confidence in tooltips
  • add a category legend, per-span table, and focused renderer tests for typed, untyped, and multiple spans

Related issue

Fixes #57

Type of change

  • Bug fix
  • Feature
  • Documentation
  • Tests
  • Refactor or maintenance

Testing

  • python3 -m ruff format --check demo/streamlit_demo.py tests/test_demo_pytest.py
  • python3 -m ruff check demo/streamlit_demo.py tests/test_demo_pytest.py
  • python3 -m pytest tests/test_demo_pytest.py -v (3 passed)
  • python3 -m py_compile demo/streamlit_demo.py tests/test_demo_pytest.py
  • git diff --check
  • pytest tests/test_inference_pytest.py -v -k "not TestAnswerStartToken" — collection was attempted but this runner does not have torch installed
  • Interactive model-download smoke test — not run locally because the runner lacks Streamlit/model dependencies and has insufficient disk for the model stack

Checklist

  • I kept the PR focused on one change.
  • I added or updated tests/docs when needed.
  • I checked that no secrets, API keys, or credentials are included.

Rights & sign-off (required)

  • I certify that I have the right to submit this code and that it may be
    distributed under the repository's MIT license
    (see CONTRIBUTING).

Signed-off-by: w3lld1 <42353747+w3lld1@users.noreply.github.com>
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.

Showcase typed spans in the Streamlit demo

1 participant