Fix broken SentenceTransformer snippet; format code with Python format
#11
by
tomaarsen
HF staff
- opened
Hello!
Pull Request overview
- Fix broken SentenceTransformer snippet: It said
'
instead ofmodel_name_or_path
(bug was introduced in https://huggingface.co./Alibaba-NLP/gte-multilingual-base/commit/167d84dcd20a1f29c277626db5175f7442274cee) - Give the code snippets Python coloring by adding
python
right after the triple tick - Use more SentenceTransformer functionality:
normalize_embeddings=True
inmodel.encode
&model.similarity
to compute the cosine similarity.
Details
This should fix the snippet and make the README code blocks easier to read.
cc @thenlper
- Tom Aarsen
thenlper
changed pull request status to
merged