Update app.py
Browse files
app.py
CHANGED
|
@@ -173,7 +173,7 @@ if ask:
|
|
| 173 |
|
| 174 |
dice = randint(1, 6)
|
| 175 |
logger.info(f" dice: {dice}")
|
| 176 |
-
if dice
|
| 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"] =
|
| 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"
|