langtest.modelhandler.modelhandler.ModelAPI#
- class ModelAPI#
Bases:
ABCAbstract 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 classmethod load_model(*args: Any, **kwargs: Any) _T#
Load the model.
- abstract predict(text: str | dict, *args, **kwargs)#
Perform predictions on input text.