sentiment-demo / README.md
techresearchspace's picture
Upload 2 files
97390c6 verified
|
Raw
History Blame Contribute Delete
1.2 kB
---
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](https://huggingface.co/docs/transformers.js). The model
([`Xenova/distilbert-base-uncased-finetuned-sst-2-english`](https://huggingface.co/Xenova/distilbert-base-uncased-finetuned-sst-2-english),
an ONNX-converted version of
[`distilbert-base-uncased-finetuned-sst-2-english`](https://huggingface.co/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.:
```bash
python -m http.server 8000
```