Spaces:
No application file
No application file
Update services/ai_client.py
Browse files- services/ai_client.py +2 -1
services/ai_client.py
CHANGED
|
@@ -20,7 +20,8 @@ def _create_client() -> genai.Client:
|
|
| 20 |
"""
|
| 21 |
|
| 22 |
# Retrieve Gemini API key from Streamlit Secrets.
|
| 23 |
-
GEMINI_API_KEY = st.secrets["gemapikey"]
|
|
|
|
| 24 |
|
| 25 |
# Prevent app from running without an API key
|
| 26 |
if not GEMINI_API_KEY:
|
|
|
|
| 20 |
"""
|
| 21 |
|
| 22 |
# Retrieve Gemini API key from Streamlit Secrets.
|
| 23 |
+
# GEMINI_API_KEY = st.secrets["gemapikey"]
|
| 24 |
+
GEMINI_API_KEY = os.environ.get("gemapikey") or st.secrets.get("gemapikey")
|
| 25 |
|
| 26 |
# Prevent app from running without an API key
|
| 27 |
if not GEMINI_API_KEY:
|