Closed hovanhoa closed 1 month ago
I ran this below code to make a prompt for an image
import google.generativeai as genai import PIL.Image import os img = PIL.Image.open('<IMAGE_FILE>') model = genai.GenerativeModel(model_name="<MY_TUNED_MODEL>") response = model.generate_content([img]) print(response.text)
But It's return the exception:
google.api_core.exceptions.InvalidArgument: 400 Image input modality is not enabled for
I already researched for this exception but found nothing. can anyone help me?
No response
But It's worked if I try Gemini model (such as gemini-1.5-flash)
gemini-1.5-flash
bug
Hi @hovanhoa. Currently, model tuning is available for text and not for image & video.
Hmm, thank you @gmKeshari
Description of the bug:
I ran this below code to make a prompt for an image
But It's return the exception:
I already researched for this exception but found nothing. can anyone help me?
Actual vs expected behavior:
No response
Any other information you'd like to share?
But It's worked if I try Gemini model (such as
gemini-1.5-flash
)