class_docstr: Predicting Text from MMFusion models.
class_docstr_tok: ["Predicting","Text","from","MMFusion","models","."]
code: def __init__(self, config):
      super().__init__(config)
      from transformers import AutoTokenizer
  
      self.tokenizer = AutoTokenizer.from_pretrained(
          config.dataset.bert_name, bos_token="[CLS]", eos_token="[SEP]"
      )
      self.bos_token_id = self.tokenizer.bos_token_id
      self.eos_token_id = self.tokenizer.eos_token_id
  
imports: import os
  import random
  import json
  import numpy
  import torch
  import pickle
  import math
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new NLGPredictor object from inherited base classes: Predictor with example: obj = NLGPredictor(config)