ThisIs-Developer commited on
Commit
6e4bdf2
1 Parent(s): 77e04bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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
- conversation.append({"role": "user", "message": query})
119
- # Call your QA function
120
- answer = qa_bot(query)
121
- conversation.append({"role": "bot", "message": answer})
122
- st.session_state.conversation = conversation
 
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()