Adding randomness to pipeline(), seed


I’m using an image-to-text pipeline, and I always get the same output for a given input. Is there a way to add randomness so that with a given input, the output is slightly different? sort of a seed.

This is the code that I have:

from transformers import pipeline

captioner = pipeline(model="nlpconnect/vit-gpt2-image-captioning", generator=generator)
test = captioner("")