Spaces:
Sleeping
Sleeping
fix
Browse files- app.py +2 -0
- requirements.txt +3 -2
app.py
CHANGED
@@ -88,6 +88,8 @@ def retrieve_and_rerank(query, k=5):
|
|
88 |
.to_list()
|
89 |
)
|
90 |
|
|
|
|
|
91 |
# re-rank
|
92 |
docs = [f"{item['title']} {item['abstract']}" for item in retrieved]
|
93 |
results = ranker.rank(query=query, docs=docs)
|
|
|
88 |
.to_list()
|
89 |
)
|
90 |
|
91 |
+
print(f"Retrieved {len(retrieved)} documents")
|
92 |
+
|
93 |
# re-rank
|
94 |
docs = [f"{item['title']} {item['abstract']}" for item in retrieved]
|
95 |
results = ranker.rank(query=query, docs=docs)
|
requirements.txt
CHANGED
@@ -11,5 +11,6 @@ datasets
|
|
11 |
tqdm
|
12 |
tantivy==0.22.0
|
13 |
lancedb
|
14 |
-
rerankers
|
15 |
-
transformers
|
|
|
|
11 |
tqdm
|
12 |
tantivy==0.22.0
|
13 |
lancedb
|
14 |
+
rerankers==0.5.3
|
15 |
+
transformers
|
16 |
+
torch
|