Skip to content

Commit

Permalink
Update transformers_similarity.py (#6280)
Browse files Browse the repository at this point in the history
Fixing the Document examples
  • Loading branch information
TuanaCelik authored Nov 13, 2023
1 parent 92a8704 commit bf637e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TransformersSimilarityRanker:
from haystack.preview.components.rankers import TransformersSimilarityRanker
ranker = TransformersSimilarityRanker()
docs = [Document(text="Paris"), Document(text="Berlin")]
docs = [Document(content="Paris"), Document(content="Berlin")]
query = "City in Germany"
output = ranker.run(query=query, documents=docs)
docs = output["documents"]
Expand Down

0 comments on commit bf637e9

Please sign in to comment.