Hashim998 commited on
Commit
c71f825
·
verified ·
1 Parent(s): 50ce9bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -27,11 +27,11 @@ logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(
27
  logger = logging.getLogger(__name__)
28
 
29
  # === Load API Key ===
30
- os.environ["GOOGLE_API_KEY"] = os.getenv["GEMINI_API_KEY"]
31
 
32
- # GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
33
- # if not GEMINI_API_KEY:
34
- #raise ValueError("GEMINI_API_KEY is missing. Set it as an environment variable or Hugging Face Secret.")
35
 
36
  genai.configure(api_key=GEMINI_API_KEY)
37
 
 
27
  logger = logging.getLogger(__name__)
28
 
29
  # === Load API Key ===
30
+ # os.environ["GOOGLE_API_KEY"] = os.getenv["GEMINI_API_KEY"]
31
 
32
+ GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
33
+ if not GEMINI_API_KEY:
34
+ raise ValueError("GEMINI_API_KEY is missing. Set it as an environment variable or Hugging Face Secret.")
35
 
36
  genai.configure(api_key=GEMINI_API_KEY)
37