I'm trying to give an input image and a prompt/question related to the image, and I want to get the relevant answer from ColPali model. But I'm not able to implement this . When I try
model.generate(**model_inputs, max_length=2048)
it's showing the following error
TypeError: The current model class (ColPali) is not compatible with .generate(), as it doesn't have a language model head. Please use one of the following classes instead: {'PaliGemmaForConditionalGeneration'}
Could you please share some example code for visual question answering task using ColPali?
@poojitha892 ColPali is a model for retrieval not for generating answers. You can use a model like gemini or gpt-4o for taking in retrieved images and answering questions.
I'm trying to give an input image and a prompt/question related to the image, and I want to get the relevant answer from ColPali model. But I'm not able to implement this . When I try
Could you please share some example code for visual question answering task using ColPali?