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.
  4. trust_remote_code (bool): Allow for custom Python files to be used from the model_name location.

Example 7.0:

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


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

Table of contents