Update app.py
Browse files
app.py
CHANGED
|
@@ -124,7 +124,7 @@ class PDFSearchApp:
|
|
| 124 |
#direct retrieve file path rather than rely on page nums!
|
| 125 |
#try to retrieve multiple files rather than a single page (TBD)
|
| 126 |
|
| 127 |
-
page_num = search_results[0][1] # final return value is a list of tuples, each tuple being: (score, doc_id, collection_name), so use [0][2] to get collection name of first ranked item
|
| 128 |
coll_num = search_results[0][2]
|
| 129 |
|
| 130 |
print(f"Retrieved page number: {page_num}")
|
|
|
|
| 124 |
#direct retrieve file path rather than rely on page nums!
|
| 125 |
#try to retrieve multiple files rather than a single page (TBD)
|
| 126 |
|
| 127 |
+
page_num = search_results[0][1] +1 # final return value is a list of tuples, each tuple being: (score, doc_id, collection_name), so use [0][2] to get collection name of first ranked item, need +1!
|
| 128 |
coll_num = search_results[0][2]
|
| 129 |
|
| 130 |
print(f"Retrieved page number: {page_num}")
|