Skip to main content

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

License Downloads Website shields.io PyPI

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 Discord server: Support Server

HappyTransformer

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
Text-to-Text
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

Tutorials

Text classification (training)

Text classification (hate speech detection)

Text classification (sentiment analysis)

Text generation with training (GPT-Neo)

Word prediction with training (DistilBERT, RoBERTa)

Project details


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.3.1.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

happytransformer-2.3.1-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file happytransformer-2.3.1.tar.gz.

File metadata

  • Download URL: happytransformer-2.3.1.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for happytransformer-2.3.1.tar.gz
Algorithm Hash digest
SHA256 1ba1f2df4ec460f96d9a7ccc686e2d0107dce4c268850ee6664c2b34d01a333b
MD5 0b70f236e67f072fb3fa3a64f6f5e025
BLAKE2b-256 64adc08b7d127f07a5eea27fbe810b838e082ef5e30d33f5c5e124dda96d1235

See more details on using hashes here.

File details

Details for the file happytransformer-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: happytransformer-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.6

File hashes

Hashes for happytransformer-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28ad58d563e9f9fc004f8f7d4dd09216d8d51d72942d320b3a3188fa2d581d6c
MD5 2f633419eecc9def0a2fd2bd707778f2
BLAKE2b-256 619ca0c8e0b5061021812203e44f7466470e9f26fcb7aa7701ddcd81f321a9ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page