Instructions to use sentence-transformers/clip-ViT-B-32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sentence-transformers/clip-ViT-B-32 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sentence-transformers/clip-ViT-B-32") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Copy of config.json in directory sentence-transformers/clip-ViT-B-32 please
#3
by jawhster - opened
I am using towhee to load huggingface models and it looks for the config.json file. I was able to get it to load ops.sentence_embedding.transformers(model_name='sentence-transformers/clip-ViT-B-32-multilingual-v1') because that config.json file is in main directory. But am unable to get it to load this because config.json is in 0_Clip... Thank you
I decided to use openai/clip-vit-base-patch32 (https://huggingface.co/openai/clip-vit-base-patch32/blob/main/config.json) which I believe is equivalent