lazyslide.tl.slide_caption

Contents

lazyslide.tl.slide_caption#

slide_caption(wsi, prompt, feature_key, *, agg_key=None, agg_by=None, max_length=100, model='prism', device=None)#

Generate captions for the slide.

Parameters:
wsiWSIData

The WSIData object to work on.

promptlist of str

The text instruction to generate the caption.

feature_keystr

The slide features to be used.

agg_keystr

The aggregation key

agg_bystr or list of str

The aggregation keys that were used to create the slide features.

max_lengthint

The maximum length of the generated caption.

model{“prism”}

The caption generation model to use.

devicestr

The device to use for inference. If None, the default device will be used.