code: def __init__(
      self,
      output="output",
      weight_path=None,
      load_checkpoint: str = None,
  ):
      super(RealSRPredictor, self).__init__()
      self.input = input
      self.output = os.path.join(output, "RealSR")
      self.model = RRDBNet(3, 3, 64, 23)
  
      if load_checkpoint is not None:
          state_dict = paddle.load(load_checkpoint)
          self.model.load_dict(state_dict)
          print("load custom checkpoint success")
  
      else:
          checkpoint = os.path.join(
              self.directory, "DF2K_JPEG.pdparams"
          )
          if not os.path.exists(checkpoint):
              os.system(
                  "wget https://paddlegan.bj.bcebos.com/applications/DF2K_JPEG.pdparams -O "
                  + checkpoint
              )
          state_dict = paddle.load(checkpoint)
          self.model.load_dict(state_dict)
          print("load pretrained checkpoint success")
  
      self.model.eval()
  
file_path: PaddleHub/modules/image/Image_editing/super_resolution/realsr/module.py
imports: import os
  import cv2
  import glob
  from tqdm import tqdm
  import numpy
  from PIL import Image
  import paddle
  import paddle.nn
  from paddlehub.module.module import moduleinfo, serving
  from .rrdb import RRDBNet
  from .None import utils
label_desc: Use image node_id 1 to create a new RealSRPredictor object from inherited base classes: nn with example: obj = RealSRPredictor(output, weight_path, load_checkpoint)