Skip to content

Commit

Permalink
Update open_clip.md (#1485)
Browse files Browse the repository at this point in the history
Add import requests line
  • Loading branch information
speed1313 authored Nov 25, 2024
1 parent 6e6ef80 commit 112c7f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/hub/open_clip.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Once loaded, you can encode the image and text to do [zero-shot image classifica
```py
import torch
from PIL import Image
import requests

url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)
Expand Down

0 comments on commit 112c7f9

Please sign in to comment.