Happy Transformer is an API built on top of Hugging Face's Transformer library that makes it easy to utilize state-of-the-art NLP models.
Project description
Happy Transformer
Documentation and news: happytransformer.com
Join our brand new Discord server:
Happy Transformer is an package built on top of Hugging Face's transformer library that makes it easy to utilize state-of-the-art NLP models.
Features
Public Methods | Basic Usage | Training |
---|---|---|
Text Generation | ✔ | ✔ |
Text Classification | ✔ | ✔ |
Word Prediction | ✔ | ✔ |
Question Answering | ✔ | ✔ |
Next Sentence Prediction | ✔ | |
Token Classification | ✔ |
Quick Start
pip install happytransformer
from happytransformer import HappyWordPrediction
#--------------------------------------#
happy_wp = HappyWordPrediction() # default uses distilbert-base-uncased
result = happy_wp.predict_mask("I think therefore I [MASK]")
print(result) # [WordPredictionResult(token='am', score=0.10172799974679947)]
print(result[0].token) # am
Maintainers
- Eric Fillion Lead Maintainer
- Ted Brownlow Maintainer
Tutorials
Text classification (hate speech detection)
Text classification (sentiment analysis)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
happytransformer-2.2.3.tar.gz
(22.3 kB
view hashes)
Built Distribution
Close
Hashes for happytransformer-2.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efbc066f3ab0787a4e69631b1e32c7dd86c0298b5fad98f57fc2e0a7db1d4a54 |
|
MD5 | 8f473588aee690ba02d211a5f9a961e2 |
|
BLAKE2b-256 | 72704baab49c47294b0890fc833c9797b5c937537a94ee668f4dd4df69bca64d |