Text Classifier Block
- from @localmode
- by LocalMode
Custom-label zero-shot classification with MobileBERT MNLI over a user-editable label set (add trimmed + case-insensitively deduped, remove, live count) with an email/message textarea and sample loader. Results render a top-result hero (winning label + confidence) above a ranked score list of all candidate labels. Guards empty input and an empty label set; the model downloads only behind Run. No model bytes download until an explicit in-block action.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @localmode/ui/blocks/text-insights/text-classifierRegistry dependencies8
- @localmode/ui/lib/utils
- @localmode/ui/results/editable-label-set
- @localmode/ui/results/top-result-card
- @localmode/ui/results/scored-result-bar-list
- @localmode/ui/local-first/model-loading-panel
- @localmode/ui/local-first/cache-badge
- @localmode/ui/results/error-alert
- @localmode/ui/results/mode-error-boundary
