mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-09 06:13:43 +00:00
Update code snippet in readme
This commit is contained in:
parent
bd823c9a6f
commit
451e51a224
@ -206,7 +206,8 @@ reader = FARMReader(model_name_or_path="deepset/roberta-base-squad2", use_gpu=Tr
|
|||||||
pipeline = ExtractiveQAPipeline(reader, retriever)
|
pipeline = ExtractiveQAPipeline(reader, retriever)
|
||||||
|
|
||||||
# Voilá! Ask a question!
|
# Voilá! Ask a question!
|
||||||
prediction = pipeline.run(query="Who is the father of Arya Stark?", top_k_retriever=10,top_k_reader=3)
|
prediction = pipe.run(query="Who is the father of Arya Stark?",
|
||||||
|
params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}})
|
||||||
print_answers(prediction, details="minimal")
|
print_answers(prediction, details="minimal")
|
||||||
|
|
||||||
[ { 'answer': 'Eddard',
|
[ { 'answer': 'Eddard',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user