Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,8 @@ import traceback
|
|
| 8 |
from collections import defaultdict
|
| 9 |
|
| 10 |
# Security: Use Streamlit secrets for API key
|
| 11 |
-
openai.api_key = st.secrets["OPENAI_API_KEY"]
|
|
|
|
| 12 |
|
| 13 |
# Important: Use environment variables for API keys in production!
|
| 14 |
# api_key = os.getenv("OPENAI_API_KEY") # Recommended approach
|
|
|
|
| 8 |
from collections import defaultdict
|
| 9 |
|
| 10 |
# Security: Use Streamlit secrets for API key
|
| 11 |
+
# openai.api_key = st.secrets["OPENAI_API_KEY"]
|
| 12 |
+
openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 13 |
|
| 14 |
# Important: Use environment variables for API keys in production!
|
| 15 |
# api_key = os.getenv("OPENAI_API_KEY") # Recommended approach
|