Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,12 @@ import os
|
|
5 |
|
6 |
|
7 |
# Fetch the OpenAI API key from Streamlit secrets
|
8 |
-
OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
|
|
9 |
# Retrieve the OpenAI API Key from secrets
|
10 |
-
openai.api_key = st.secrets["OPENAI_API_KEY"]
|
|
|
|
|
11 |
|
12 |
# # Fetch Pinecone API key and environment from Streamlit secrets
|
13 |
os.environ["PINECONE_API_KEY"] = st.secrets["PINECONE_API_KEY"]
|
|
|
5 |
|
6 |
|
7 |
# Fetch the OpenAI API key from Streamlit secrets
|
8 |
+
os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
|
9 |
+
# OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
10 |
# Retrieve the OpenAI API Key from secrets
|
11 |
+
# openai.api_key = st.secrets["OPENAI_API_KEY"]
|
12 |
+
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
13 |
+
openai.api_key = OPENAI_API_KEY
|
14 |
|
15 |
# # Fetch Pinecone API key and environment from Streamlit secrets
|
16 |
os.environ["PINECONE_API_KEY"] = st.secrets["PINECONE_API_KEY"]
|