Spaces:
Sleeping
Sleeping
add enumerate for error fix
Browse files
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', ' ')
|