class_docstr: Class wrapping an InferenceLearner model and giving to it the
  huggingface interface.
  
  The class fuse both the InterfaceLearner and HuggingFace interfaces, giving
  to the final user a model which can be used whit the prefered API without
  the need of adapting the previous code.
  
  Attributes:
      network_parameters (ModelParams): Model parameters of the model.
      core_inference_learner (PytorchBaseInferenceLearner): Inference learner
          built using the Pytorch interface.
      output_structure (Dict): Original output structure of the HuggingFace
          model.
      input_names (List[str]): List of all the input keys used for the
          original HuggingFace model.
      output_type (Any, optional): Original output type of the HuggingFace
          model.
class_docstr_tok: ["Class","wrapping","an","InferenceLearner","model","and","giving","to","it","the","huggingface","interface",".","The","class","fuse","both","the","InterfaceLearner","and","HuggingFace","interfaces",",","giving","to","the","final","user","a","model","which","can","be","used","whit","the","prefered","API","without","the","need","of","adapting","the","previous","code",".","Attributes",":","network_parameters","(","ModelParams",")",":","Model","parameters","of","the","model",".","core_inference_learner","(","PytorchBaseInferenceLearner",")",":","Inference","learner","built","using","the","Pytorch","interface",".","output_structure","(","Dict",")",":","Original","output","structure","of","the","HuggingFace","model",".","input_names","(","List","[","str","]",")",":","List","of","all","the","input","keys","used","for","the","original","HuggingFace","model",".","output_type","(","Any",",","optional",")",":","Original","output","type","of","the","HuggingFace","model","."]
docstr: Run the underlying optimized model for getting a prediction.
  
  The method has an hybrid interface. It accepts inputs either as
  positional or keyword arguments. If only positional arguments are given
  the method expects the inputs to be in the canonical
  nebullvm interface. If only keyword arguments are given the method
  expects them to be in the HuggingFace interface. Mixed representation
  is not allowed and will result in an error.
docstr_tok: ["Run","the","underlying","optimized","model","for","getting","a","prediction",".","The","method","has","an","hybrid","interface",".","It","accepts","inputs","either","as","positional","or","keyword","arguments",".","If","only","positional","arguments","are","given","the","method","expects","the","inputs","to","be","in","the","canonical","nebullvm","interface",".","If","only","keyword","arguments","are","given","the","method","expects","them","to","be","in","the","HuggingFace","interface",".","Mixed","representation","is","not","allowed","and","will","result","in","an","error","."]
code: def run(self, *args, **kwargs) -> Any:
      """Run the underlying optimized model for getting a prediction.
  
      The method has an hybrid interface. It accepts inputs either as
      positional or keyword arguments. If only positional arguments are given
      the method expects the inputs to be in the canonical
      nebullvm interface. If only keyword arguments are given the method
      expects them to be in the HuggingFace interface. Mixed representation
      is not allowed and will result in an error.
      """
      if len(args) > 0 and len(kwargs) > 0:
          raise RuntimeError(
              "Not allowed usage of the predict method. "
              "Either the positional or the keyword arguments must be given."
          )
      if len(args) > 0:
          return self.core_inference_learner(*args)
      inputs = (kwargs.pop(name) for name in self.input_names)
      outputs = self.core_inference_learner(*inputs)
  
      if self.output_type is tuple:
          return outputs
      else:
          return restructure_output(
              outputs, self.output_structure, self.output_type
          )
  
imports: from abc import ABC
  from collections import OrderedDict
  from pathlib import Path
  from typing import List, Any, Dict, Union
  from nebullvm.operations.inference_learners.base import InferenceLearnerWrapper, PytorchBaseInferenceLearner, LearnerMetadata, BaseInferenceLearner
  from nebullvm.optional_modules.diffusers import StableDiffusionPipeline
  from nebullvm.optional_modules.torch import torch
  from nebullvm.tools.diffusers import postprocess_diffusers
  from nebullvm.tools.huggingface import restructure_output
  from nebullvm.tools.pytorch import get_torch_model_size
label_desc: Use image node_id 6 for calling the HuggingFaceInferenceLearner obj's underlying member method code with example usage: obj.run() and returns: self, outputs, restructure_output