add waiting message
Browse files
app.py
CHANGED
@@ -129,10 +129,11 @@ if ask:
|
|
129 |
if api_key is "":
|
130 |
output = "Whoops looks like you forgot your API key buddy"
|
131 |
else:
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
|
137 |
st.write(f"**1984:** {output}")
|
138 |
|
|
|
129 |
if api_key is "":
|
130 |
output = "Whoops looks like you forgot your API key buddy"
|
131 |
else:
|
132 |
+
with st.spinner("Um... excuse me but... this can take about a minute for your first question because some stuff have to be downloaded π₯Ίππ»ππ»"):
|
133 |
+
try:
|
134 |
+
output = get_answer(question=user_input)
|
135 |
+
except:
|
136 |
+
output = "What's going on? That's not the right API key"
|
137 |
|
138 |
st.write(f"**1984:** {output}")
|
139 |
|