mikeee commited on
Commit
23a122d
·
1 Parent(s): 902e5df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -130,9 +130,6 @@ def get_answer(question):
130
 
131
  return answer, pages, extract
132
 
133
-
134
-
135
-
136
  ##### sidebar section 2 ####
137
  with st.sidebar:
138
  api_key = st.text_input(label = "And paste your OpenAI API key here to get started",
@@ -178,7 +175,8 @@ if ask:
178
  api_key_ = os.environ["OPENAI_API_KEY"]
179
  st.write(f"**{BOOK_NAME}:** got {dice}, lucky you!")
180
  else:
181
- api_key_ = os.environ["OPENAI_API_KEY"]
 
182
 
183
  if not api_key_:
184
  st.write(f"**{BOOK_NAME}:** got {dice}, no luck, try again?")
 
130
 
131
  return answer, pages, extract
132
 
 
 
 
133
  ##### sidebar section 2 ####
134
  with st.sidebar:
135
  api_key = st.text_input(label = "And paste your OpenAI API key here to get started",
 
175
  api_key_ = os.environ["OPENAI_API_KEY"]
176
  st.write(f"**{BOOK_NAME}:** got {dice}, lucky you!")
177
  else:
178
+ # api_key_ = os.environ["OPENAI_API_KEY"]
179
+ api_key_ = api_key
180
 
181
  if not api_key_:
182
  st.write(f"**{BOOK_NAME}:** got {dice}, no luck, try again?")