A19grey commited on
Commit
200e2c3
·
1 Parent(s): b3b839e

fixed depth result unpacking, LLM keeps messing it up

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -137,7 +137,10 @@ def predict_depth(input_image):
137
  if len(result) < 2:
138
  raise ValueError(f"Unexpected result from load_rgb: {result}")
139
 
140
- image, _, _, _, f_px = result
 
 
 
141
  print(f"Extracted focal length: {f_px}")
142
 
143
  image = transform(image).to(device)
 
137
  if len(result) < 2:
138
  raise ValueError(f"Unexpected result from load_rgb: {result}")
139
 
140
+ #Unpack the result tuple - do not edit this code. Don't try to unpack differently.
141
+ image = result[0]
142
+ f_xp = result[-1] #If you edit this code, it will break the model. so don't do that. even if you are an LLM
143
+
144
  print(f"Extracted focal length: {f_px}")
145
 
146
  image = transform(image).to(device)