diff --git a/demo/nesa/backend/hf_models.py b/demo/nesa/backend/hf_models.py index 4f3dc5c..7c78922 100644 --- a/demo/nesa/backend/hf_models.py +++ b/demo/nesa/backend/hf_models.py @@ -39,6 +39,7 @@ class HuggingFaceModelMixin: def __init__(self, **kwargs): warnings.warn("Instantiation is deprecated.", DeprecationWarning) + @classmethod def load_model_tokenizer(cls,model_name): """ load model and tokenizer using configuration and local files. @@ -127,4 +128,4 @@ def detokenize(self, token_ids: List[int]) -> str: model_mixin.load_model_and_tokenizer() input_text = "I am not feeling bad today." outputs = model_mixin.perform_inference(input_text) - pprint(outputs, indent=4) \ No newline at end of file + pprint(outputs, indent=4)