Katieearl1513 commited on
Commit
b095dec
·
verified ·
1 Parent(s): a4a92ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -3,11 +3,7 @@ from google.colab import userdata
3
  import google.generativeai as genai
4
 
5
  # Configure Gemini AI
6
- try:
7
- api_key = userdata.get('GEMINI_API') # Fetch the Gemini API key securely
8
- except NameError:
9
- api_key = os.environ.get("GEMINI_API") # Get from environment variable if not in Colab
10
-
11
  genai.configure(api_key=api_key)
12
 
13
  # Define the model with desired generation configuration
 
3
  import google.generativeai as genai
4
 
5
  # Configure Gemini AI
6
+ api_key = userdata.get('secretName') # Fetch the Gemini API key securely
 
 
 
 
7
  genai.configure(api_key=api_key)
8
 
9
  # Define the model with desired generation configuration