arittrabag commited on
Commit
3fced9f
·
verified ·
1 Parent(s): f038699

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -12,8 +12,12 @@ from dotenv import load_dotenv
12
 
13
  load_dotenv()
14
 
15
- # Set your Gemini API key here (or load via env var in production)
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()