calmgoose commited on
Commit
3de41a3
β€’
1 Parent(s): a2460ed

`st.stop()` instead of `break`

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -152,7 +152,7 @@ if ask:
152
  if api_key is "":
153
  # output = "Whoops looks like you forgot your API key buddy"
154
  st.write("**1984:** Whoops looks like you forgot your API key buddy")
155
- break
156
  else:
157
  with st.spinner("Um... excuse me but... this can take about a minute for your first question because some stuff have to be downloaded πŸ₯ΊπŸ‘‰πŸ»πŸ‘ˆπŸ»"):
158
  try:
@@ -160,7 +160,7 @@ if ask:
160
  except:
161
  # output = "What's going on? That's not the right API key"
162
  st.write("**1984:** What\'s going on? That's not the right API key")
163
- break
164
 
165
  st.write(f"**1984:** {answer}")
166
 
 
152
  if api_key is "":
153
  # output = "Whoops looks like you forgot your API key buddy"
154
  st.write("**1984:** Whoops looks like you forgot your API key buddy")
155
+ st.stop()
156
  else:
157
  with st.spinner("Um... excuse me but... this can take about a minute for your first question because some stuff have to be downloaded πŸ₯ΊπŸ‘‰πŸ»πŸ‘ˆπŸ»"):
158
  try:
 
160
  except:
161
  # output = "What's going on? That's not the right API key"
162
  st.write("**1984:** What\'s going on? That's not the right API key")
163
+ st.stop()
164
 
165
  st.write(f"**1984:** {answer}")
166