1、环境:
python 3.6 , tensorflow 1.13.1
python3.6 conda搭建:
conda create -n py36 python=3.6
conda activate py36
pip install tensorflow==1.13.1
安装server:
pip install bert-serving-server # server pip install bert-serving-client # client, independent of `bert-serving-server`
下载模型:
比如:/tmp/english_L-12_H-768_A-12/
启动server
bert-serving-start -model_dir 模型地址 -num_worker=4
参考: