Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion demo/nesa/backend/hf_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
pprint(outputs, indent=4)