second
Browse files
app.py
CHANGED
@@ -604,13 +604,13 @@ demo: Optional[gr.Interface] = None # Assign your gradio demo to this variable
|
|
604 |
return_type = List[Hit]
|
605 |
|
606 |
## YOUR_CODE_STARTS_HERE
|
607 |
-
csc_bm25_index =
|
608 |
documents=iter(sciq.corpus),
|
609 |
ndocs=12160,
|
610 |
show_progress_bar=False
|
611 |
)
|
612 |
csc_bm25_index.save("output/csc_bm25_index")
|
613 |
-
csc_bm25_retriever =
|
614 |
|
615 |
|
616 |
def BM25_search(term):
|
|
|
604 |
return_type = List[Hit]
|
605 |
|
606 |
## YOUR_CODE_STARTS_HERE
|
607 |
+
csc_bm25_index = BM25Index.build_from_documents(
|
608 |
documents=iter(sciq.corpus),
|
609 |
ndocs=12160,
|
610 |
show_progress_bar=False
|
611 |
)
|
612 |
csc_bm25_index.save("output/csc_bm25_index")
|
613 |
+
csc_bm25_retriever = BM25Retriever(index_dir="output/csc_bm25_index")
|
614 |
|
615 |
|
616 |
def BM25_search(term):
|