mikeee commited on
Commit
40361d5
·
1 Parent(s): f09ac0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -173,7 +173,7 @@ if ask:
173
 
174
  dice = randint(1, 6)
175
  logger.info(f" dice: {dice}")
176
- if dice == 6:
177
  api_key_ = api_key
178
  # st.stop()
179
  else: # use space secret[OPENAI_API_KEY/envion,
@@ -183,7 +183,7 @@ if ask:
183
  st.write(f"**{BOOK_NAME}:** got {dice}, no luck, try again?")
184
  st.stop()
185
  else:
186
- os.environ["OPENAI_API_KEY"] = api_key
187
  # if ns.counter: # this does not work
188
  if 'key' in st.session_state:
189
  msg = "Just one sec"
 
173
 
174
  dice = randint(1, 6)
175
  logger.info(f" dice: {dice}")
176
+ if dice != 6:
177
  api_key_ = api_key
178
  # st.stop()
179
  else: # use space secret[OPENAI_API_KEY/envion,
 
183
  st.write(f"**{BOOK_NAME}:** got {dice}, no luck, try again?")
184
  st.stop()
185
  else:
186
+ os.environ["OPENAI_API_KEY"] = api_key_
187
  # if ns.counter: # this does not work
188
  if 'key' in st.session_state:
189
  msg = "Just one sec"