Skip to content

Commit 5222cd9

Browse files
miniMaddystevhliu
authored andcommitted
Edited Zoedepth model file
1 parent 4653249 commit 5222cd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/source/en/model_doc/zoedepth.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ The example below demonstrates how to generate text based on an image with [`Pip
3535
```py
3636
import torch
3737
from transformers import pipeline
38+
from PIL import Image
39+
import requests
3840

39-
pipeline = pipeline(
41+
image = Image.open(requests.get(url, stream=True).raw)
42+
pipe = pipeline(
4043
task="depth-estimation",
4144
model="Intel/zoedepth-nyu-kitti",
4245
device=0
4346
)
44-
pipeline(images="http://images.cocodataset.org/val2017/000000039769.jpg")
47+
results = pipe(image)
48+
depth = result['depth']
4549
```
4650

4751
</hfoption>

0 commit comments

Comments
 (0)