Spaces:
Sleeping
Sleeping
removed some basic colab requirements
Browse files
app.py
CHANGED
@@ -9,10 +9,9 @@ import gradio as gr
|
|
9 |
# Configure Gemini API key
|
10 |
gemini_api_secret_name = 'AIzaSyA0yLvySmj8xjMd0sedSgklg1fj0wBDyyw'
|
11 |
|
12 |
-
from google.colab import userdata
|
13 |
|
14 |
try:
|
15 |
-
GOOGLE_API_KEY =
|
16 |
genai.configure(api_key=GOOGLE_API_KEY)
|
17 |
except userdata.SecretNotFoundError as e:
|
18 |
print(f'Secret not found\n\nThis expects you to create a secret named {gemini_api_secret_name} in Colab\n\nVisit https://makersuite.google.com/app/apikey to create an API key\n\nStore that in the secrets section on the left side of the notebook (key icon)\n\nName the secret {gemini_api_secret_name}')
|
|
|
9 |
# Configure Gemini API key
|
10 |
gemini_api_secret_name = 'AIzaSyA0yLvySmj8xjMd0sedSgklg1fj0wBDyyw'
|
11 |
|
|
|
12 |
|
13 |
try:
|
14 |
+
GOOGLE_API_KEY = 'AIzaSyA0yLvySmj8xjMd0sedSgklg1fj0wBDyyw'
|
15 |
genai.configure(api_key=GOOGLE_API_KEY)
|
16 |
except userdata.SecretNotFoundError as e:
|
17 |
print(f'Secret not found\n\nThis expects you to create a secret named {gemini_api_secret_name} in Colab\n\nVisit https://makersuite.google.com/app/apikey to create an API key\n\nStore that in the secrets section on the left side of the notebook (key icon)\n\nName the secret {gemini_api_secret_name}')
|