sohojoe commited on
Commit
1731153
1 Parent(s): cdfc363

fix naming in docs

Browse files
Files changed (1) hide show
  1. experimental/clip_app_client.py +5 -5
experimental/clip_app_client.py CHANGED
@@ -13,17 +13,17 @@ class ClipAppClient:
13
  """
14
  A class to handle generating embeddings using the OpenAI CLIP model.
15
 
16
- clip_embeddings = ClipEmbeddings()
17
 
18
  test_image_url = "https://example.com/image.jpg"
19
- preprocessed_image = clip_embeddings.preprocess_image(test_image_url)
20
 
21
  text = "A beautiful landscape"
22
- text_embeddings = clip_embeddings.text_to_embedding(text)
23
 
24
- image_embeddings = clip_embeddings.image_url_to_embedding(test_image_url)
25
 
26
- preprocessed_image_embeddings = clip_embeddings.preprocessed_image_to_embedding(preprocessed_image)
27
  """
28
 
29
  def __init__(self, clip_model="ViT-L/14", device=None):
 
13
  """
14
  A class to handle generating embeddings using the OpenAI CLIP model.
15
 
16
+ app_client = ClipAppClient()
17
 
18
  test_image_url = "https://example.com/image.jpg"
19
+ preprocessed_image = app_client.preprocess_image(test_image_url)
20
 
21
  text = "A beautiful landscape"
22
+ text_embeddings = app_client.text_to_embedding(text)
23
 
24
+ image_embeddings = app_client.image_url_to_embedding(test_image_url)
25
 
26
+ preprocessed_image_embeddings = app_client.preprocessed_image_to_embedding(preprocessed_image)
27
  """
28
 
29
  def __init__(self, clip_model="ViT-L/14", device=None):