mgokg commited on
Commit
a5072c3
·
verified ·
1 Parent(s): 8ee760c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -72,8 +72,10 @@ def generate(input_text):
72
  return
73
 
74
  try:
 
75
  client = genai.Client(
76
  api_key=os.environ.get("GEMINI_API_KEY"),
 
77
  )
78
  except Exception as e:
79
  yield f"Error initializing client: {e}. Make sure GEMINI_API_KEY is set.", input_text
 
72
  return
73
 
74
  try:
75
+ # Initialize Client with v1alpha
76
  client = genai.Client(
77
  api_key=os.environ.get("GEMINI_API_KEY"),
78
+ http_options={'api_version': 'v1alpha'} # <--- ENABLE v1alpha HERE
79
  )
80
  except Exception as e:
81
  yield f"Error initializing client: {e}. Make sure GEMINI_API_KEY is set.", input_text