ykl7 commited on
Commit
69d2736
·
1 Parent(s): 35b2358

add enumerate for error fix

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -144,7 +144,7 @@ def retriever(query: str, selected_retriever: str):
144
 
145
  corpus = '\n\n'.join(topk_documents)
146
 
147
- for idx, document in topk_documents:
148
  try:
149
  idx = document.lower().index("abstract:")
150
  title = document[:idx].replace('\n', ' ')
 
144
 
145
  corpus = '\n\n'.join(topk_documents)
146
 
147
+ for idx, document in enumerate(topk_documents):
148
  try:
149
  idx = document.lower().index("abstract:")
150
  title = document[:idx].replace('\n', ' ')