parent
dcc8c77cda
commit
b3fa8ca795
@ -0,0 +1,12 @@
|
||||
# 安装向量化的包
|
||||
# conda activate rag
|
||||
# 断开VPN后执行安装包
|
||||
# pip install text2vec
|
||||
|
||||
|
||||
from text2vec import SentenceModel
|
||||
sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']
|
||||
|
||||
model = SentenceModel('shibing624/text2vec-base-chinese')
|
||||
embeddings = model.encode(sentences)
|
||||
print(embeddings)
|
Loading…
Reference in new issue