Kazel commited on
Commit
f82687f
·
verified ·
1 Parent(s): 518e3cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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] + 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}")
@@ -345,5 +345,5 @@ def create_ui():
345
  if __name__ == "__main__":
346
  demo = create_ui()
347
  #demo.launch(auth=("admin", "pass1234")) for with login page config
348
- demo.launch()
349
 
 
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}")
 
345
  if __name__ == "__main__":
346
  demo = create_ui()
347
  #demo.launch(auth=("admin", "pass1234")) for with login page config
348
+ #demo.launch()
349