reading Image

#11
by Hadbeen123 - opened

{'id': 'chatcmpl-5dde1400-febd-48d5-94f1-de1e86076abf',
'object': 'chat.completion',
'created': 1747907389,
'model': .../.cache/huggingface/hub/models--google--gemma-3-12b-it-qat-q4_0-gguf/snapshots/7929e34ac7c459bbfd1f38d7358e6839f204578b/./gemma-3-12b-it-q4_0.gguf',
'choices': [{'index': 0,
'message': {'role': 'assistant',
'content': 'Please provide me with the image you would like me to describe! I need to see the image to give you a one-sentence description.\n'},
'logprobs': None,
'finish_reason': 'stop'}],
'usage': {'prompt_tokens': 18, 'completion_tokens': 29, 'total_tokens': 47}}

running this , i get the error above ?
image1 = '7000_images/20190111_003017822/image_p2-27.png'

image1 = Image.open(image1)
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image",
"image": image1
}
]
}
]
)

Hi @Hadbeen123 ,

Welcome to Google Gemma family of open source models, the above issue might be occur due not passing the image properly. The command which is given in the model card is just sample one, could you please check the image path that you have provided to the command that you are running in your local. In addition to that please check whether you are passing all the required parameter values in the command.

Thanks.

Sign up or log in to comment