本次构建文本对话的FAQ的问答机器人,落地方向为智能运维客服机器人、在线营销 FAQ机器人。
一、安装环境
1.创建faiss环境
conda create -n faiss python=3.7
2.切入环境
activate faiss
3.安装faiss-cpu
conda install faiss-cpu -c pytorch
4.测试faiss安装是否成功
>>python
>>import faiss, numpy
>>faiss.Kmeans(10, 20).train(numpy.random.rand(1000, 10).astype('float32'))
5.安装tensorflow的cpu版安装
5.1 pip install tensorflow==1.15.3 --user -i https://pypi.tuna.tsinghua.edu.cn/simple
5.2 测试
>python
>import tensorflow as tf
如果报错: Downgrade the protobuf package to 3.20.x or lower
pip install protobuf==3.20.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
--------------------------------------------------------