code: def predict(inp):
      inp = Image.fromarray(inp.astype("uint8"), "RGB")
      inp = transforms.ToTensor()(inp).unsqueeze(0)
      with torch.no_grad():
          prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
      return {labels[i]: float(prediction[i]) for i in range(1000)}
  
imports: import requests
  import torch
  from PIL import Image
  from torchvision import transforms
  import gradio
label_desc: Use image node_id 1 for calling a global function with example usage: predict(inp) and returns: unknown