Parth-1705 commited on
Commit
f05357f
·
verified ·
1 Parent(s): 23c3f5e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -3
main.py CHANGED
@@ -18,9 +18,12 @@ from flask import Flask, request, jsonify
18
  # ========== Google Generative AI (Gemini) imports ==========
19
  import google.generativeai as genai
20
 
21
- # Instead of loading from .env, we set keys directly for Colab:
22
- GOOGLE_API_KEY = "AIzaSyD5VEtDouS48guib1kScxYzXhepy7B0ZfM"
23
- MONGO_URI = "mongodb+srv://nkharshbachhav:6vXGGAWOSLpGkXPJ@resume.ooqny.mongodb.net/resume_database?retryWrites=true&w=majority"
 
 
 
24
 
25
  # Configure the Gemini client with the API key
26
  genai.configure(api_key=GOOGLE_API_KEY)
 
18
  # ========== Google Generative AI (Gemini) imports ==========
19
  import google.generativeai as genai
20
 
21
+ # Load environment variables
22
+ load_dotenv()
23
+
24
+ # Get API keys from environment variables
25
+ GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY')
26
+ MONGO_URI = os.getenv('MONGO_URI')
27
 
28
  # Configure the Gemini client with the API key
29
  genai.configure(api_key=GOOGLE_API_KEY)