awinml commited on
Commit
12db858
1 Parent(s): b692e8c

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -155,7 +155,7 @@ decoder_model = st.selectbox("Select Decoder Model", decoder_models_choice)
155
  if encoder_model == "MPNET":
156
  # Connect to pinecone environment
157
  pinecone.init(
158
- api_key="ea9fd320-6f8a-4edd-bf41-9e972b95cbf9", environment="us-east1-gcp"
159
  )
160
  pinecone_index_name = "week2-all-mpnet-base"
161
  pinecone_index = pinecone.Index(pinecone_index_name)
@@ -164,7 +164,7 @@ if encoder_model == "MPNET":
164
  elif encoder_model == "SGPT":
165
  # Connect to pinecone environment
166
  pinecone.init(
167
- api_key="0d8215d7-4ad5-4c76-8c45-4a40c0f6a1b7", environment="us-east1-gcp"
168
  )
169
  pinecone_index_name = "week2-sgpt-125m"
170
  pinecone_index = pinecone.Index(pinecone_index_name)
@@ -197,7 +197,7 @@ st.subheader("Answer:")
197
  if decoder_model == "GPT3 (summary_davinci)":
198
  openai_key = st.text_input(
199
  "Enter OpenAI key",
200
- value="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",
201
  type="password",
202
  )
203
  api_key = save_key(openai_key)
@@ -211,7 +211,7 @@ if decoder_model == "GPT3 (summary_davinci)":
211
  elif decoder_model == "GPT3 (QA_davinci)":
212
  openai_key = st.text_input(
213
  "Enter OpenAI key",
214
- value="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",
215
  type="password",
216
  )
217
  api_key = save_key(openai_key)
 
155
  if encoder_model == "MPNET":
156
  # Connect to pinecone environment
157
  pinecone.init(
158
+ api_key=st.secrets["pinecone_mpnet"], environment="us-east1-gcp"
159
  )
160
  pinecone_index_name = "week2-all-mpnet-base"
161
  pinecone_index = pinecone.Index(pinecone_index_name)
 
164
  elif encoder_model == "SGPT":
165
  # Connect to pinecone environment
166
  pinecone.init(
167
+ api_key=st.secrets["pinecone_sgpt"], environment="us-east1-gcp"
168
  )
169
  pinecone_index_name = "week2-sgpt-125m"
170
  pinecone_index = pinecone.Index(pinecone_index_name)
 
197
  if decoder_model == "GPT3 (summary_davinci)":
198
  openai_key = st.text_input(
199
  "Enter OpenAI key",
200
+ value=st.secrets["openai_key"],
201
  type="password",
202
  )
203
  api_key = save_key(openai_key)
 
211
  elif decoder_model == "GPT3 (QA_davinci)":
212
  openai_key = st.text_input(
213
  "Enter OpenAI key",
214
+ value=st.secrets["openai_key"],
215
  type="password",
216
  )
217
  api_key = save_key(openai_key)