openai / CLIP

CLIP (Contrastive Language-Image Pretraining), Predict the most relevant text snippet given an image
MIT License
24.55k stars 3.2k forks source link

CLIp png not found #406

Open power9799 opened 9 months ago

power9799 commented 9 months ago

I'm trying to run the code on the site. it is giving me this error. image = preprocess(Image.open("CLIP.png")).unsqueeze(0).to(device) File /opt/homebrew/Cellar/jupyterlab/4.0.7_1/libexec/lib/python3.11/site-packages/PIL/Image.py:3243, in open(fp, mode, formats) 3240 filename = fp 3242 if filename: -> 3243 fp = builtins.open(filename, "rb") 3244 exclusive_fp = True 3246 try:

FileNotFoundError: [Errno 2] No such file or directory: 'CLIP.png'

jimurk commented 7 months ago

How did you solve this problem?

Len02805 commented 7 months ago

There is no "CLIP.png" under your directory. Just put a PNG file to the path then the problem solved.