Spaces:
Runtime error
Runtime error
ThisIs-Developer
commited on
Commit
•
6e4bdf2
1
Parent(s):
77e04bc
Update app.py
Browse files
app.py
CHANGED
@@ -115,11 +115,12 @@ def main():
|
|
115 |
query = st.text_input("Ask your question here:", key="user_input")
|
116 |
if st.button("Get Answer"):
|
117 |
if query:
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
123 |
else:
|
124 |
st.warning("Please input a question.")
|
125 |
|
@@ -129,4 +130,3 @@ def main():
|
|
129 |
|
130 |
if __name__ == "__main__":
|
131 |
main()
|
132 |
-
|
|
|
115 |
query = st.text_input("Ask your question here:", key="user_input")
|
116 |
if st.button("Get Answer"):
|
117 |
if query:
|
118 |
+
with st.spinner("Processing your question..."): # Display the processing message
|
119 |
+
conversation.append({"role": "user", "message": query})
|
120 |
+
# Call your QA function
|
121 |
+
answer = qa_bot(query)
|
122 |
+
conversation.append({"role": "bot", "message": answer})
|
123 |
+
st.session_state.conversation = conversation
|
124 |
else:
|
125 |
st.warning("Please input a question.")
|
126 |
|
|
|
130 |
|
131 |
if __name__ == "__main__":
|
132 |
main()
|
|