code: def run(input_data):
      input_data = torch.tensor(json.loads(input_data)["data"])
  
      # get prediction
      with torch.no_grad():
          output = model(input_data)
          classes = ["chicken", "turkey"]
          softmax = nn.Softmax(dim=1)
          pred_probs = softmax(output).numpy()[0]
          index = torch.argmax(output, 1)
  
      result = {
          "label": classes[index],
          "probability": str(pred_probs[index]),
      }
      return result
  
imports: import os
  import torch
  import torch.nn
  from torchvision import transforms
  import json
  from azureml.core.model import Model
label_desc: Use image node_id 2 for calling a global function with example usage: run(input_data) and returns: result