`st.stop()` instead of `break`
Browse files
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 |
-
|
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 |
-
|
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 |
|