langtest.modelhandler.custom_modelhandler.PretrainedCustomModel#
- class PretrainedCustomModel(model: Any)#
Bases:
ABCAbstract base class for a custom pretrained model.
- model#
The pretrained model to be used for prediction.
- Type:
Any
- load_model(cls, model
Any) -> “Any”: Loads the pretrained model.
- __call__(self, text
str) -> None: Calls the predict method for the given input text.
Methods
__init__(model)load_model(path)predict(text, *args, **kwargs)predict_raw(text, *args, **kwargs)