class_docstr: Detoxify
  Easily predict if a comment or list of comments is toxic.
  Can initialize 5 different model types from model type or checkpoint path:
      - original:
          model trained on data from the Jigsaw Toxic Comment
          Classification Challenge
      - unbiased:
          model trained on data from the Jigsaw Unintended Bias in
          Toxicity Classification Challenge
      - multilingual:
          model trained on data from the Jigsaw Multilingual
          Toxic Comment Classification Challenge
      - original-small:
          lightweight version of the original model
      - unbiased-small:
          lightweight version of the unbiased model
  Args:
      model_type(str): model type to be loaded, can be either original,
                       unbiased or multilingual
      checkpoint(str): checkpoint path, defaults to None
      device(str or torch.device): accepts any torch.device input or
                                   torch.device object, defaults to cpu
      huggingface_config_path: path to HF config and tokenizer files needed for offline model loading
  Returns:
      results(dict): dictionary of output scores for each class
class_docstr_tok: ["Detoxify","Easily","predict","if","a","comment","or","list","of","comments","is","toxic",".","Can","initialize","5","different","model","types","from","model","type","or","checkpoint","path",":","-","original",":","model","trained","on","data","from","the","Jigsaw","Toxic","Comment","Classification","Challenge","-","unbiased",":","model","trained","on","data","from","the","Jigsaw","Unintended","Bias","in","Toxicity","Classification","Challenge","-","multilingual",":","model","trained","on","data","from","the","Jigsaw","Multilingual","Toxic","Comment","Classification","Challenge","-","original-small",":","lightweight","version","of","the","original","model","-","unbiased-small",":","lightweight","version","of","the","unbiased","model","Args",":","model_type","(","str",")",":","model","type","to","be","loaded",",","can","be","either","original",",","unbiased","or","multilingual","checkpoint","(","str",")",":","checkpoint","path",",","defaults","to","None","device","(","str","or","torch.device",")",":","accepts","any","torch.device","input","or","torch.device","object",",","defaults","to","cpu","huggingface_config_path",":","path","to","HF","config","and","tokenizer","files","needed","for","offline","model","loading","Returns",":","results","(","dict",")",":","dictionary","of","output","scores","for","each","class"]
code: def __init__(
      self,
      model_type="original",
      checkpoint=PRETRAINED_MODEL,
      device="cpu",
      huggingface_config_path=None,
  ):
      super().__init__()
      self.model, self.tokenizer, self.class_names = load_checkpoint(
          model_type=model_type,
          checkpoint=checkpoint,
          device=device,
          huggingface_config_path=huggingface_config_path,
      )
      self.device = device
      self.model.to(self.device)
  
file_path: detoxify/detoxify/detoxify.py
imports: import torch
  import transformers
label_desc: Use image node_id 1 to create a new Detoxify object  with example: obj = Detoxify(model_type, checkpoint, device, huggingface_config_path)