Spaces:
Sleeping
Sleeping
Commit
·
f2ce899
1
Parent(s):
ed16fab
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,14 +83,14 @@ with st.form(key='my_form'):
|
|
| 83 |
submit = st.form_submit_button("Submit", key="submit")
|
| 84 |
|
| 85 |
|
| 86 |
-
# If the "Ask" button is clicked
|
| 87 |
-
if submit:
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
| 83 |
submit = st.form_submit_button("Submit", key="submit")
|
| 84 |
|
| 85 |
|
| 86 |
+
# If the "Ask" button is clicked
|
| 87 |
+
if submit:
|
| 88 |
+
# Display loading message while processing
|
| 89 |
+
with st.spinner("Analyzing..."):
|
| 90 |
+
response = get_chatmodel_response(input_question)
|
| 91 |
+
|
| 92 |
+
if response is not None:
|
| 93 |
+
# st.subheader("Here you go,")
|
| 94 |
+
st.write(response)
|
| 95 |
+
else:
|
| 96 |
+
st.subheader("Error: Unable to get response. Please try again later.")
|