cryogenic22 commited on
Commit
dcd7943
·
verified ·
1 Parent(s): e142514

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -279,8 +279,12 @@ def main():
279
  st.markdown("<p style='color: #1E3A8A;'>Retrieving answer...</p>", unsafe_allow_html=True)
280
  try:
281
  response, source_documents = qa_system.run(query=user_query, return_source_documents=True)
 
282
  st.markdown("<h4 style='color: #1E3A8A;'>Answer:</h4>", unsafe_allow_html=True)
283
- st.write(response)
 
 
 
284
 
285
  # Store Query and Response in Database
286
  with conn:
 
279
  st.markdown("<p style='color: #1E3A8A;'>Retrieving answer...</p>", unsafe_allow_html=True)
280
  try:
281
  response, source_documents = qa_system.run(query=user_query, return_source_documents=True)
282
+ response = qa_system.run(query=user_query, return_source_documents=True)
283
  st.markdown("<h4 style='color: #1E3A8A;'>Answer:</h4>", unsafe_allow_html=True)
284
+ st.write(response["result"]) # Access the answer text
285
+ st.write(response["source_documents"]) # Access the source documents
286
+
287
+
288
 
289
  # Store Query and Response in Database
290
  with conn: