class_docstr: Class for Hugging Face sequence classification models trained on a NLI dataset
  
  Attributes:
      model_path: path to HF model
      tokenizer_path: path to HF tokenizer
      name: string identifier for the model. Lowercase letters and numbers.
          No spaces/special characters except dashes.
      description: String description of the model.
      tasks: List of supported task strings
      details: Dictionary of additional details about the model
      model_class: Class used to initialise model
      tokenizer_class: Class used to initialise tokenizer
      device: Device for model. Defaults to "cuda" if available.
docstr: Uses the model for the text-classification task
  
  Args:
      task_input: input dictionary according to the ``text-classification`` task specification.
          Needs labels (for zero-shot).
      task: text-classification
docstr_tok: ["Uses","the","model","for","the","text-classification","task","Args",":","task_input",":","input","dictionary","according","to","the","``","text-classification","``","task","specification",".","Needs","labels","(","for","zero-shot",")",".","task",":","text-classification"]
code: def __call__(self, task_input, task="text-classification"):
      """
      Uses the model for the text-classification task
  
      Args:
          task_input: input dictionary according to the ``text-classification`` task specification.
              Needs labels (for zero-shot).
          task: text-classification
      """
      if task == "text-classification":
          is_list = False
  
          text = task_input.get("text")
          labels = task_input.get("labels")
          top_k = task_input.get("top_k", 10000)
  
          if labels == None:
              raise ValueError("labels must be provided")
  
          if isinstance(text, list):
              is_list = True
          else:
              text = [text]
              labels = [labels]
  
          # Must have a consistent amount of examples
          assert len(text) == len(labels)
  
          probs = self.classify(text, labels, top_k)
  
          if not is_list:
              probs = probs[0]
  
          return probs
      else:
          raise ValueError(f"Unsupported task: {task}")
  
file_path: backprop/backprop/models/hf_nli_model/model.py
imports: from typing import List, Dict
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
  from backprop.models import HFModel
  import torch
label_desc: Use image node_id 2 for calling the HFNLIModel obj's underlying member method code with example usage: obj.__call__(task_input, task) and returns: probs