Link Search Menu Expand Document


Initialize a HappyTextToText() object to perform text-to-text generation

Initialization Arguments:

  1. model_type (string): Specify the model name in all caps, such as “T5” or “BART”
  2. model_name(string): below are URLs that contains potential models: standard models and translation models
  3. use_auth_token (string): Specify the authentication token to load private models.

Example 7.0:

from happytransformer import HappyTextToText
# --------------------------------------#
happy_tt = HappyTextToText("T5", "t5-small")  # default
happy_tt_private = HappyTextToText("T5", "user-repo/t5-small", use_auth_token="123abc")  # default


Top T5 Models Grammar Correction Fine-tune a Grammar Correction Model

Table of contents