admin08077 commited on
Commit
b6c0b11
·
verified ·
1 Parent(s): 66accd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  import gradio as gr
3
- from google import generativeai as genai
4
  import time
5
 
6
  # --- Load Gemini API key securely ---
@@ -8,7 +8,7 @@ GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")
8
  if not GEMINI_API_KEY:
9
  raise ValueError("❌ GEMINI_API_KEY not found. Please set it in your Hugging Face Space Secrets.")
10
 
11
- genai.configure(api_key=GEMINI_API_KEY)
12
 
13
  # --- Constants ---
14
  MODEL_NAME = "gemini-1.5-flash-latest"
 
1
  import os
2
  import gradio as gr
3
+ from google import genai
4
  import time
5
 
6
  # --- Load Gemini API key securely ---
 
8
  if not GEMINI_API_KEY:
9
  raise ValueError("❌ GEMINI_API_KEY not found. Please set it in your Hugging Face Space Secrets.")
10
 
11
+ client = genai.CLient()
12
 
13
  # --- Constants ---
14
  MODEL_NAME = "gemini-1.5-flash-latest"