mikeee commited on
Commit
75d5fc9
Β·
1 Parent(s): e3d1ca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -164,7 +164,7 @@ col1.write(f"**You:** {user_input}")
164
  ask = col2.button("Ask", type="primary")
165
 
166
  if ask:
167
- if api_key is "":
168
  st.write(f"**{BOOK_NAME}:** Whoops looks like you forgot your API key buddy. We throw a dice to decide wether you can ask one question for free.")
169
  # stop with a prob = 0.9
170
  if random() > 1/6:
@@ -181,7 +181,7 @@ if ask:
181
  if 'key' in st.session_state:
182
  msg = "Just one sec"
183
  else:
184
- msg = "Um... excuse me but... this can take about a minute for your first question because some stuff have to be downloaded πŸ₯ΊπŸ‘‰πŸ»πŸ‘ˆπŸ»"
185
  st.session_state.key = 'value'
186
  # ns.counter = 1
187
  with st.spinner(msg):
 
164
  ask = col2.button("Ask", type="primary")
165
 
166
  if ask:
167
+ if not api_key:
168
  st.write(f"**{BOOK_NAME}:** Whoops looks like you forgot your API key buddy. We throw a dice to decide wether you can ask one question for free.")
169
  # stop with a prob = 0.9
170
  if random() > 1/6:
 
181
  if 'key' in st.session_state:
182
  msg = "Just one sec"
183
  else:
184
+ msg = "Um... excuse me but... this can take about a minute for your first question because some stuff needs to be downloaded πŸ₯ΊπŸ‘‰πŸ»πŸ‘ˆπŸ»"
185
  st.session_state.key = 'value'
186
  # ns.counter = 1
187
  with st.spinner(msg):