Text-to-Text
Initialize a HappyTextToText() object to perform text-to-text generation
Initialization Arguments:
- model_type (string): Specify the model name in all caps, such as “T5” or “BART”
- model_name(string): below are URLs that contains potential models: standard models and translation models
- use_auth_token (string): Specify the authentication token to load private models.
- 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
Tutorials
Top T5 Models Grammar Correction Fine-tune a Grammar Correction Model