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
New Course: Create a text generation web app. Also learn how to fine-tune GPT-Neo link
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 | ✔ | |
Text-to-Text | ✔ |
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 (training)
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.4.tar.gz
(23.9 kB
view hashes)
Built Distribution
Close
Hashes for happytransformer-2.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f3504e898c7b1aa4ada957bb4d10ab5c45ad70411e0c17739aa9b3091000b6d |
|
MD5 | 62b73ef013e44e4aa8a7bb5bdb5a159f |
|
BLAKE2b-256 | d6e2541eead178c066d843b0105aff73285fdc11438e8eaeb82efff6379fc690 |