update to 1.0.5
This commit is contained in:
parent
e666de1e63
commit
25b1df6e8a
@ -42,6 +42,10 @@ corpus = [
|
|||||||
|
|
||||||
model.add_corpus(corpus)
|
model.add_corpus(corpus)
|
||||||
model.save_index('en_corpus_emb.json')
|
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')
|
model.load_index('en_corpus_emb.json')
|
||||||
res = model.most_similar(queries=sentences1, topn=3)
|
res = model.most_similar(queries=sentences1, topn=3)
|
||||||
print(res)
|
print(res)
|
||||||
|
Loading…
Reference in New Issue
Block a user