You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
image = Image.open("shivsatri.jpg")
response = client.models.generate_content(
model="gemini-2.5-flash",
contents=[image, "Tell me about this instrument"]
)
print(response.text)`
it was fixed like this:
╭────────────────────────────────────────────────────
│ ✔ Edit imageai.py: from PIL import Image... => from PIL import Image...
│
│ 1 from PIL import Image
│ 2 - from google import genai
│ 2 + import google.generativeai as genai
│ 3
│ 4 + genai.configure(api_key =
│ "AIzaSyCcz313_srMUs3X_paBF0CBsHQ4_aDOx9c")
│ 5
│ 5 -
│ 6 - client = genai.Client(api_key =
│ "AIzaSyCcz313_srMUs3X_paBF0CBsHQ4_aDOx9c")
│ 7 -
│ 6 image = Image.open("shivsatri.jpg")
│ 7
│ 10 - response = client.models.generate_content(
│ 11 - model = "gemini-2.5-flash",
│ 12 - contents = [image, "Tell me about this instrument"]
│ 8 + model = genai.GenerativeModel('gemini-1.5-flash-latest')
│ 9 +
│ 10 + response = model.generate_content(
│ 11 + [image, "Tell me about this instrument"]
│ 12 )
│ 13
│ 14 print(response.text)
╰───────────────────────────────────────────────────────────────