main
HuangHai 1 month ago
parent dcc8c77cda
commit b3fa8ca795

@ -0,0 +1,7 @@
# 永久修改pip源为阿里云镜像源适用于Windows系统
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 验证是否修改成功
pip config list
global.index-url='https://mirrors.aliyun.com/pypi/simple/'

@ -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…
Cancel
Save