vishwask commited on
Commit
3a90b17
1 Parent(s): 23ef3ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -144,11 +144,13 @@ if prompt := st.chat_input("How can I help you today?"):
144
  with st.chat_message("user"):
145
  st.markdown(prompt)
146
  with st.chat_message("assistant"):
147
- message_placeholder = st.empty()
148
- full_response = ""
149
- message_history = "\n".join(list(get_message_history())[-3:])
150
- result = qa_chain(prompt)
151
- output = [result['result']]
 
 
152
 
153
  def generate_pdf():
154
  page_number = int(result['source_documents'][0].metadata['page'])
 
144
  with st.chat_message("user"):
145
  st.markdown(prompt)
146
  with st.chat_message("assistant"):
147
+ with st.spinner(text="Looking for relevant answer"):
148
+
149
+ message_placeholder = st.empty()
150
+ full_response = ""
151
+ message_history = "\n".join(list(get_message_history())[-3:])
152
+ result = qa_chain(prompt)
153
+ output = [result['result']]
154
 
155
  def generate_pdf():
156
  page_number = int(result['source_documents'][0].metadata['page'])