langtest.modelhandler.custom_modelhandler.PretrainedCustomModel#

class PretrainedCustomModel(model: Any)#

Bases: ABC

Abstract 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.

predict(self, text

str, *args, **kwargs): Predicts the output for the given input text.

__call__(self, text

str) -> None: Calls the predict method for the given input text.

__init__(model: Any) None#

Methods

__init__(model)

load_model(path)

predict(text, *args, **kwargs)

predict_raw(text, *args, **kwargs)