You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
# 安装向量化的包
|
|
# conda activate rag
|
|
# 断开VPN后执行安装包
|
|
# pip install text2vec
|
|
|
|
|
|
from text2vec import SentenceModel
|
|
sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']
|
|
|
|
model = SentenceModel('shibing624/text2vec-base-chinese')
|
|
embeddings = model.encode(sentences)
|
|
print(embeddings) |