Skip to content

Commit

Permalink
Update requirements& fix multi recall bugs (PaddlePaddle#3979)
Browse files Browse the repository at this point in the history
  • Loading branch information
w5688414 authored Dec 1, 2022
1 parent 72a5459 commit 330c561
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,23 @@ def semantic_search_tutorial():
pipeline.add_node(component=ranker, name="Ranker", inputs=["JoinResults"])
# Keywords recall results
prediction = pipeline.run(
query="广播权", params={"BMRetriever": {"top_k": 10}, "DenseRetriever": {"top_k": 10}, "Ranker": {"top_k": 3}}
query="广播权",
params={
"BMRetriever": {"top_k": args.bm_topk},
"DenseRetriever": {"top_k": args.dense_topk},
"Ranker": {"top_k": args.rank_topk},
},
)
print_documents(prediction)
# Dense vector recall results
prediction = pipeline.run(
query="期货交易手续费指的是什么?",
params={"BMRetriever": {"top_k": 10}, "DenseRetriever": {"top_k": 10}, "Ranker": {"top_k": 3}},
params={
"BMRetriever": {"top_k": args.bm_topk},
"DenseRetriever": {"top_k": args.dense_topk},
"Ranker": {"top_k": args.rank_topk},
},
)
pipeline.draw("multi_recall.png")
print_documents(prediction)


Expand Down
5 changes: 2 additions & 3 deletions pipelines/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
paddlenlp
paddlenlp>=2.4.3
paddleocr
requests
pydantic
Expand All @@ -15,12 +15,11 @@ faiss-cpu>=1.7.2
opencv-python>=4.4
opencv-contrib-python-headless
python-multipart
htbuilder@git+https://github.com/tvst/htbuilder.git
st-annotated-text
click==8.0
streamlit==1.9.0
fastapi
uvicorn
markdown
numba
pymilvus
pymilvus>=2.1

0 comments on commit 330c561

Please sign in to comment.