import warnings,logging warnings.simplefilter('ignore') logging.disable(logging.WARNING) from transformers import pipeline cap = pipeline('image-to-text') cap('')