akhaliq HF staff commited on
Commit
e9d914e
1 Parent(s): d6c2352

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import matplotlib.pyplot as plt
6
  import subprocess
7
  import spaces
8
 
 
9
  subprocess.run(["bash", "get_pretrained_models.sh"])
10
 
11
  # Load model and preprocessing transform
@@ -15,7 +16,7 @@ model.eval()
15
  @spaces.GPU(duration=120)
16
  def predict_depth(input_image):
17
  # Preprocess the image
18
- result = depth_pro.load_rgb(input_image.name)
19
  image = result[0]
20
  f_px = result[-1] # Assuming f_px is the last item in the returned tuple
21
  image = transform(image)
 
6
  import subprocess
7
  import spaces
8
 
9
+ # Run the script to get pretrained models
10
  subprocess.run(["bash", "get_pretrained_models.sh"])
11
 
12
  # Load model and preprocessing transform
 
16
  @spaces.GPU(duration=120)
17
  def predict_depth(input_image):
18
  # Preprocess the image
19
+ result = depth_pro.load_rgb(input_image) # Removed .name
20
  image = result[0]
21
  f_px = result[-1] # Assuming f_px is the last item in the returned tuple
22
  image = transform(image)