Adding randomness to pipeline(), seed

Hello,

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("https://huggingface.co/datasets/Narsil/image_dummy/raw/main/parrots.png")

Thanks