n3ura commited on
Commit
d5edd0c
·
1 Parent(s): f364d4c

Fix syntax for accessing depth in README example

Browse files

Avoid AttributeError: 'dict' object has no attribute 'depth'

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -47,7 +47,7 @@ image = Image.open(requests.get(url, stream=True).raw)
47
 
48
  # inference
49
  outputs = depth_estimator(image)
50
- depth = outputs.depth
51
  ```
52
  For more code examples, we refer to the [documentation](https://huggingface.co/transformers/main/model_doc/zoedepth.html#).
53
 
 
47
 
48
  # inference
49
  outputs = depth_estimator(image)
50
+ depth = outputs['depth']
51
  ```
52
  For more code examples, we refer to the [documentation](https://huggingface.co/transformers/main/model_doc/zoedepth.html#).
53