Core Models
Call CLIP and DocTR foundation models through the inference-sdk HTTP client, with sync and async methods.
CLIP
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(
api_url="http://localhost:9001", # or "https://serverless.roboflow.com" to use hosted serving
api_key="ROBOFLOW_API_KEY"
)
CLIENT.get_clip_image_embeddings(inference_input="./my_image.jpg") # single image request
CLIENT.get_clip_image_embeddings(inference_input=["./my_image.jpg", "./other_image.jpg"]) # batch image request
CLIENT.get_clip_text_embeddings(text="some") # single text request
CLIENT.get_clip_text_embeddings(text=["some", "other"]) # other text request
CLIENT.clip_compare(
subject="./my_image.jpg",
prompt=["fox", "dog"],
)DocTR
Gaze (deprecated)
Last updated
Was this helpful?