metadata
title: Sentiment Analysis Demo
emoji: 🤗
colorFrom: blue
colorTo: purple
sdk: static
pinned: false
license: mit
models:
- distilbert-base-uncased-finetuned-sst-2-english
Sentiment Analysis Demo (in-browser)
A static, client-side sentiment analysis demo powered by
🤗 Transformers.js. The model
(Xenova/distilbert-base-uncased-finetuned-sst-2-english,
an ONNX-converted version of
distilbert-base-uncased-finetuned-sst-2-english)
downloads and runs entirely in the visitor's browser via WebAssembly — no server,
no backend, no API calls, and no subscription required to host.
How it works
Open index.html — nothing to build or install. The page loads the model on
first visit (cached by the browser afterward), then classifies whatever text
you type as POSITIVE or NEGATIVE with a confidence score.
Running locally
Just open index.html directly in a browser, or serve the folder with any
static file server, e.g.:
python -m http.server 8000