pretrained
allennlp_models.pretrained
get_tasks#
def get_tasks() -> Dict[str, TaskCard]
Returns a mapping of TaskCard
s for all
tasks.
get_pretrained_models#
def get_pretrained_models() -> Dict[str, ModelCard]
Returns a mapping of ModelCard
s for all
available pretrained models.
load_predictor#
def load_predictor(
model_id: str,
pretrained_models: Dict[str, ModelCard] = None,
cuda_device: int = -1,
overrides: Union[str, Dict[str, Any]] = None
) -> Predictor
Returns the Predictor
corresponding to the given model_id
.
The model_id
should be key present in the mapping returned by
get_pretrained_models
.