Skip to content

Huggingface

pixeltable.functions.huggingface

clip_image

clip_image(image: Batch[Image], *, model_id: str) -> Batch[ndarray]

Runs the specified CLIP model on images.

clip_text

clip_text(text: Batch[str], *, model_id: str) -> Batch[ndarray]

Runs the specified CLIP model on text.

cross_encoder

cross_encoder(
    sentences1: Batch[str], sentences2: Batch[str], *, model_id: str
) -> Batch[float]

Runs the specified cross-encoder model.

detr_for_object_detection

detr_for_object_detection(
    image: Batch[Image], *, model_id: str, threshold: float = 0.5
) -> Batch[dict]

Runs the specified DETR model.

sentence_transformer

sentence_transformer(
    sentences: Batch[str], *, model_id: str, normalize_embeddings: bool = False
) -> Batch[ndarray]

Runs the specified sentence transformer model.