code: def __init__(self, model: str):
      if AutoModel is None:
          raise ValueError(
              "`transformers` is needed for `HuggingFaceModel`"
          )
      super().__init__()
      self.tokenizer = self.tokenizer_base.from_pretrained(model)
      self.model = self.model_base.from_pretrained(model)
  
imports: from typing import Any
  from typing import Dict
  from typing import List
  from typing import Type
  from typing import Union
  from typing import Callable
  from typing import Optional
  from cftool.misc import check_requires
  from cftool.misc import shallow_copy_dict
  from cftool.types import np_dict_type
  from cftool.types import tensor_dict_type
  from ....data import ArrayDictData
  from ....types import texts_type
  from ....schema import IDLModel
  from ....schema import IInference
  from ....schema import TrainerState
label_desc: Use image node_id 1 to create a new HuggingFaceModel object from inherited base classes: IDLModel with example: obj = HuggingFaceModel(model)