code: def __init__(
      self,
      model_name="t5-base",
      tokenizer_name=None,
      min_length=10,
      max_length=20,
      temperature=1.0,
      top_k=50,
      top_p=0.9,
      batch_size=32,
      device="cuda",
      silence=True,
  ):
      super().__init__(device, model_type=None, silence=silence)
      try:
          from transformers import pipeline
      except ModuleNotFoundError:
          raise ModuleNotFoundError(
              "Missed transformers library. Install transfomers by `pip install transformers`"
          )
  
      self.model_name = model_name
      self.tokenizer_name = (
          model_name if tokenizer_name is None else tokenizer_name
      )
      self.min_length = min_length
      self.max_length = max_length
      self.temperature = temperature
      self.top_k = top_k
      self.top_p = top_p
      self.batch_size = batch_size
  
      if silence:
          # Transformers thrown an warning regrading to weight initialization. It is expected
          orig_log_level = logging.getLogger(
              "transformers." + "modeling_utils"
          ).getEffectiveLevel()
          logging.getLogger(
              "transformers." + "modeling_utils"
          ).setLevel(logging.ERROR)
  
          device = self.convert_device(device)
  
          self.model = pipeline(
              "summarization",
              model=self.model_name,
              tokenizer=self.tokenizer_name,
              device=device,
              framework="pt",
          )
          logging.getLogger(
              "transformers." + "modeling_utils"
          ).setLevel(orig_log_level)
  
imports: import logging
  from nlpaug.model.lang_models import LanguageModels
label_desc: Use image node_id 1 to create a new XSumTransformers object from inherited base classes: LanguageModels with example: obj = XSumTransformers(model_name, tokenizer_name, min_length, max_length, temperature, top_k, top_p, batch_size, device, silence)