hanxiao commited on
Commit
a3213ad
1 Parent(s): 147979c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -43,7 +43,7 @@ model = AutoModel.from_pretrained('jinaai/jina-clip-v1', trust_remote_code=True)
43
  sentences = ['The Eiffel Tower is in Paris.', 'The capital of France is Paris.']
44
  images = ['tower.jpg', 'paris.jpg'] # here we use filenames, but it also accepts URL, PIL.Image objects and dataURI strings
45
 
46
- text_embeddings = model.encode_text(sentences)
47
  image_embeddings = model.encode_image(images)
48
 
49
  print(cos_sim(text_embeddings[0], text_embeddings[1])) # text embedding similarity
 
43
  sentences = ['The Eiffel Tower is in Paris.', 'The capital of France is Paris.']
44
  images = ['tower.jpg', 'paris.jpg'] # here we use filenames, but it also accepts URL, PIL.Image objects and dataURI strings
45
 
46
+ text_embeddings = model.encode_text(sentences) # encode_text and encode_image are helper function made by us to easily get embeddings
47
  image_embeddings = model.encode_image(images)
48
 
49
  print(cos_sim(text_embeddings[0], text_embeddings[1])) # text embedding similarity