ykl7 commited on
Commit
f730a90
·
1 Parent(s): fd2561a
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -155,12 +155,15 @@ def retriever(query: str, selected_retriever: str):
155
  for idx, document in enumerate(topk_documents):
156
  try:
157
  a_idx = document.lower().index("abstract:")
 
158
  title = document[:a_idx].replace('\n', ' ')
 
159
  doc_details = document[a_idx:]
 
160
  with st.expander(f"Rank {ix+1} - {title}"):
161
  st.markdown(f"{doc_details}")
162
  except:
163
- print(f"Document parsing error for title and other contents:\n{document}")
164
 
165
  # retrieved_document_titles = ""
166
  # for document in topk_documents:
 
155
  for idx, document in enumerate(topk_documents):
156
  try:
157
  a_idx = document.lower().index("abstract:")
158
+ print(f"a_idx is {a_idx}")
159
  title = document[:a_idx].replace('\n', ' ')
160
+ print(f"title is {title}")
161
  doc_details = document[a_idx:]
162
+ print(f"document is {document}")
163
  with st.expander(f"Rank {ix+1} - {title}"):
164
  st.markdown(f"{doc_details}")
165
  except:
166
+ print(f"Document parsing error for title and other contents-\n{document}")
167
 
168
  # retrieved_document_titles = ""
169
  # for document in topk_documents: