code: def process_image(image_path):
      image_path = Path(image_path)
      image_raw = Image.open(image_path)
      image = image_raw.resize(
          (800, int(800 * image_raw.size[1] / image_raw.size[0])),
          Image.Resampling.LANCZOS,
      )
  
      # prepare image for the model
      encoding = feature_extractor(image, return_tensors="pt")
  
      # forward pass
      with torch.no_grad():
          outputs = model(**encoding)
          predicted_depth = outputs.predicted_depth
  
      # interpolate to original size
      prediction = torch.nn.functional.interpolate(
          predicted_depth.unsqueeze(1),
          size=image.size[::-1],
          mode="bicubic",
          align_corners=False,
      ).squeeze()
      output = prediction.cpu().numpy()
      depth_image = (output * 255 / np.max(output)).astype("uint8")
      try:
          gltf_path = create_3d_obj(
              np.array(image), depth_image, image_path
          )
          img = Image.fromarray(depth_image)
          return [img, gltf_path, gltf_path]
      except Exception:
          gltf_path = create_3d_obj(
              np.array(image), depth_image, image_path, depth=8
          )
          img = Image.fromarray(depth_image)
          return [img, gltf_path, gltf_path]
      except:
          print("Error reconstructing 3D model")
          raise Exception("Error reconstructing 3D model")
  
file_path: gradio/demo/depth_estimation/run.py
imports: import gradio
  from transformers import DPTFeatureExtractor, DPTForDepthEstimation
  import torch
  import numpy
  from PIL import Image
  import open3d
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: process_image(image_path) and returns: list, list