YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Emotion classification application
Selected classifier: distilbert. Attention model: bilstm_attention. Mode: full.
Use Python 3.11 or 3.12. On a CPU host, install a CPU build of PyTorch >=2.6 first, then pip install -r requirements.txt and python app.py. A complete local bundle runs offline. Missing inference assets fall back to the configured Hugging Face repo; dataset and full GloVe downloads are never performed at startup. Hosting is a separate step.
The six bars are uncalibrated model probabilities. The heatmap is the attention model’s own learned additive attention, with its own prediction. Neutral/mixed input is forced into one of six labels. See source_lock.json for Apache-2.0 dataset/model attribution and GloVe PDDL provenance.
Hugging Face model cache
Set EMOTION_HF_REPO_ID=HF_OWNER/EXACT_GITHUB_REPO_NAME after publishing the
inference bundle. Set EMOTION_HF_REVISION to the upload commit SHA for a pinned
deployment. Private repositories use hf auth login or the host's HF_TOKEN.
Never put tokens in source files. EMOTION_MODEL_CACHE selects the cache directory;
the default is .model_cache beside download_models.py.
Preload: python download_models.py --repo-id HF_OWNER/EXACT_GITHUB_REPO_NAME --revision COMMIT_SHA
Use --offline to require an already cached snapshot. The loader checks the local
bundle first, then the HF cache, and downloads only missing cached files. Every
file is SHA-256 checked and all downloads use one resolved commit. A local hash
mismatch stops loading; it does not silently change model versions. Transformers
loads from the resolved local snapshot with remote code disabled.
- Downloads last month
- 49