Spaces:
No application file
No application file
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
-
from google import
|
| 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.
|
| 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"
|