Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,12 @@ from dotenv import load_dotenv
|
|
| 12 |
|
| 13 |
load_dotenv()
|
| 14 |
|
| 15 |
-
#
|
| 16 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
model = genai.GenerativeModel("gemini-2.5-flash")
|
| 18 |
|
| 19 |
app = FastAPI()
|
|
|
|
| 12 |
|
| 13 |
load_dotenv()
|
| 14 |
|
| 15 |
+
# Use the key directly from the environment
|
| 16 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
| 17 |
+
|
| 18 |
+
# Optional debug
|
| 19 |
+
print("Gemini key loaded:", os.getenv("GEMINI_API_KEY") is not None)
|
| 20 |
+
|
| 21 |
model = genai.GenerativeModel("gemini-2.5-flash")
|
| 22 |
|
| 23 |
app = FastAPI()
|