alanchen1115 commited on
Commit
c47a0e6
·
verified ·
1 Parent(s): 1b42489

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -104,7 +104,7 @@ def generate_and_upload_image(prompt: str) -> str:
104
  """
105
  try:
106
  response = genai_client.models.generate_content(
107
- model="gemini-2.0-flash-exp",
108
  contents=prompt,
109
  config=types.GenerateContentConfig(response_modalities=['Text', 'Image'])
110
  )
@@ -147,7 +147,7 @@ def analyze_image_with_text(image_path: str, user_text: str) -> str:
147
  img_user = PIL.Image.open(image_path)
148
  print(user_text)
149
  response = genai_client.models.generate_content(
150
- model="gemini-2.0-flash-exp",
151
  contents=[img_user, user_text]
152
  )
153
 
 
104
  """
105
  try:
106
  response = genai_client.models.generate_content(
107
+ model="gemini-2.0-flash-preview-image-generation",
108
  contents=prompt,
109
  config=types.GenerateContentConfig(response_modalities=['Text', 'Image'])
110
  )
 
147
  img_user = PIL.Image.open(image_path)
148
  print(user_text)
149
  response = genai_client.models.generate_content(
150
+ model="gemini-2.0-flash-preview-image-generation",
151
  contents=[img_user, user_text]
152
  )
153