openai/CLIP ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python package that lets me use a CLIP style model to compare images and text. I want to be able to install it, load a pretrained model by name, preprocess an image, tokenize some text prompts, and get similarity scores so I can do simple zero shot classification like picking the best label for a picture.

Please include a clean README with a couple of examples, one for basic image and text matching and one for predicting labels for an image from a list of choices. I’d also like a notebook demo that shows how to use it on a sample image, plus a few tests so I can tell the core API works.

Make it easy to run on either GPU or CPU, and if you need to check current PyTorch or torchvision docs online, go ahead. Keep the code tidy and practical, with the main focus on loading the model, encoding images and text, and returning sensible probabilities.