class_docstr: ```
  predicts text classes
  ```
class_docstr_tok: ["``","`","predicts","text","classes","``","`"]
code: def __init__(self, model, preproc, batch_size=U.DEFAULT_BS):
      if not isinstance(model, keras.Model):
          raise ValueError("model must be of instance keras.Model")
      if not isinstance(preproc, TextPreprocessor):
          # if type(preproc).__name__ != 'TextPreprocessor':
          raise ValueError("preproc must be a TextPreprocessor object")
      self.model = model
      self.preproc = preproc
      self.c = self.preproc.get_classes()
      self.batch_size = batch_size
  
file_path: ktrain/ktrain/text/predictor.py
imports: from ..None import utils
  from ..imports import *
  from ..predictor import Predictor
  from .preprocessor import TextPreprocessor, TransformersPreprocessor, detect_text_format
label_desc: Use image node_id 1 to create a new TextPredictor object from inherited base classes: Predictor with example: obj = TextPredictor(model, preproc, batch_size)