langtest.modelhandler.modelhandler.ModelAPI#

class ModelAPI#

Bases: ABC

Abstract base class for handling different models.

Implementations should inherit from this class and override load_model() and predict() methods.

__init__()#

Methods

__init__()

load_model(*args, **kwargs)

Load the model.

predict(text, *args, **kwargs)

Perform predictions on input text.

Attributes

model_registry

abstract load_model(*args, **kwargs)#

Load the model.

abstract predict(text: str | dict, *args, **kwargs)#

Perform predictions on input text.