Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ def load_openai_key():
|
|
| 13 |
"""Load OpenAI API key from HuggingFace secrets"""
|
| 14 |
try:
|
| 15 |
# Try to get from HuggingFace secrets via environment variable
|
| 16 |
-
api_key = os.getenv('
|
| 17 |
|
| 18 |
if not api_key:
|
| 19 |
st.error("OpenAI API key not found in HuggingFace secrets. Please ensure the secret is set as OPENAI_API_KEY_HF in your HuggingFace space.")
|
|
|
|
| 13 |
"""Load OpenAI API key from HuggingFace secrets"""
|
| 14 |
try:
|
| 15 |
# Try to get from HuggingFace secrets via environment variable
|
| 16 |
+
api_key = os.getenv('OPENAI_API_KEY')
|
| 17 |
|
| 18 |
if not api_key:
|
| 19 |
st.error("OpenAI API key not found in HuggingFace secrets. Please ensure the secret is set as OPENAI_API_KEY_HF in your HuggingFace space.")
|