class_docstr: PP-TinyPose Model.
class_docstr_tok: ["PP-TinyPose","Model","."]
code: def create_gradio_app(self):
      import gradio as gr
      import tempfile
      import os
      from PIL import Image
  
      def inference(image, use_gpu=False):
          with tempfile.TemporaryDirectory() as temp_dir:
              self.predict(
                  img=image,
                  use_gpu=use_gpu,
                  visualization=True,
                  save_path=temp_dir,
              )
              return Image.open(
                  os.path.join(temp_dir, os.listdir(temp_dir)[0])
              )
  
      interface = gr.Interface(
          inference,
          [
              gr.inputs.Image(type="filepath"),
              gr.Checkbox(label="use_gpu"),
          ],
          gr.outputs.Image(type="ndarray"),
          title="pp-tinypose",
      )
      return interface
  
imports: import argparse
  import json
  import os
  import time
  from typing import Union
  import cv2
  import numpy
  from .det_keypoint_unite_infer import predict_with_given_det
  from .infer import Detector
  from .keypoint_infer import KeyPointDetector
  from .preprocess import base64_to_cv2
  from .preprocess import decode_image
  from .visualize import visualize_pose
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 7 for calling the PP_TinyPose obj's underlying member method code with example usage: obj.create_gradio_app() and returns: interface, Image