code: def predict(self, request):
      image = base64.b64decode(request.image.encode("utf-8"))
      image = PILImage.open(io.BytesIO(image))
      transforms = torchvision.transforms.Compose(
          [
              torchvision.transforms.Resize(224),
              torchvision.transforms.ToTensor(),
              torchvision.transforms.Normalize(
                  [0.485, 0.456, 0.406], [0.229, 0.224, 0.225]
              ),
          ]
      )
      image = transforms(image)
      image = image.to(self._device)
      prediction = self._model(image.unsqueeze(0))
      return {"prediction": prediction.argmax().item()}
  
file_path: pytorch-lightning/docs/source-app/levels/basic/hello_components/deploy_model.py
imports: from lightning.app import LightningApp, CloudCompute
  from lightning.app.components.serve import PythonServer, Image, Number
  import base64, io, torchvision, torch
  from PIL import Image
label_desc: Use image node_id 2 for calling the PyTorchServer obj's underlying member method code with example usage: obj.predict(request) and returns: dict