From 25b1df6e8ae519e9ede874b1e65dad304b986485 Mon Sep 17 00:00:00 2001 From: shibing624 Date: Sun, 16 Apr 2023 16:52:17 +0800 Subject: [PATCH] update to 1.0.5 --- examples/base_english_demo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/base_english_demo.py b/examples/base_english_demo.py index 8506a32..86bd38c 100644 --- a/examples/base_english_demo.py +++ b/examples/base_english_demo.py @@ -42,6 +42,10 @@ corpus = [ model.add_corpus(corpus) model.save_index('en_corpus_emb.json') +res = model.most_similar(queries=sentences1, topn=3) +print(res) +del model +model = Similarity(model_name_or_path="sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2") model.load_index('en_corpus_emb.json') res = model.most_similar(queries=sentences1, topn=3) print(res)