ProfessorLeVesseur commited on
Commit
91807c4
·
verified ·
1 Parent(s): 3dd5289

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -5,18 +5,18 @@ import os
5
 
6
 
7
  # Fetch the OpenAI API key from Streamlit secrets
8
- # OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
9
- os.environ["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
 
14
  # # Fetch Pinecone API key and environment from Streamlit secrets
15
- PINECONE_API_KEY = st.secrets["PINECONE_API_KEY"]
 
 
16
  # # AUTHENTICATE/INITIALIZE PINCONE SERVICE
17
  from pinecone import Pinecone
18
- # PINECONE_API_KEY = "555c0e70-331d-4b43-aac7-5b3aac5078d6"
19
- pc = Pinecone(api_key=PINECONE_API_KEY)
20
 
21
  # # Define the name of the Pinecone index
22
  index_name = 'mimtssinkqa'
 
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"]
14
+ pinecone_api_key = os.getenv("PINECONE_API_KEY")
15
+ # PINECONE_API_KEY = st.secrets["PINECONE_API_KEY"]
16
  # # AUTHENTICATE/INITIALIZE PINCONE SERVICE
17
  from pinecone import Pinecone
18
+ # pc = Pinecone(api_key=PINECONE_API_KEY)
19
+ pc = Pinecone(api_key='pinecone_api_key')
20
 
21
  # # Define the name of the Pinecone index
22
  index_name = 'mimtssinkqa'