Next Sentence Prediction
Initialize a HappyNextSentence() object to next sentence prediction
Initialization Arguments:
- model_type (string): The default is “BERT”, which is currently the only available model
- model_name(string): We recommend BERT models like “bert-base-uncased” and “bert-large-uncased” that have not been finetuned
- 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 6.0:
from happytransformer import HappyNextSentence
# --------------------------------------#
happy_ns = HappyNextSentence("BERT", "bert-base-uncased") # default
happy_ns_large = HappyNextSentence("BERT", "bert-large-uncased")
happy_ns_private = HappyNextSentence("BERT", "ericfillion/bert-base-uncased", use_auth_token="123abc")