Sentiment Analyzer Block
- from @localmode
- by LocalMode
Classify one text or thousands with DistilBERT SST-2 (one item per line, or a .txt/.csv first column) via useSequentialBatch — streaming results in input order with per-item error isolation, a cancel that keeps partial results, determinate progress plus throughput (items/sec, elapsed, ETA), aggregate positive/negative stats over every completed item, and a 100-row windowed result list. 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/sentiment-analyzerRegistry dependencies7
- @localmode/ui/lib/utils
- @localmode/ui/results/confidence-score-badge
- @localmode/ui/results/entity-stats-bar
- @localmode/ui/local-first/model-loading-panel
- @localmode/ui/local-first/cache-badge
- @localmode/ui/results/error-alert
- @localmode/ui/results/mode-error-boundary
