Seq2Seq_Chatbot_QA和DeepQA两个对话机器人测试代码:

mkdir ~/qa
cd ~/qa

-------中文Chatbot-------
git clone https://github.com/qhduan/Seq2Seq_Chatbot_QA.git
git clone https://github.com/rustch3n/dgk_lost_conv.git
cp dgk_lost_conv/dgk_shooter_min.conv.zip Seq2Seq_Chatbot_QA/
cd Seq2Seq_Chatbot_QA/
unzip dgk_shooter_min.conv.zip
pip3 install tqdm
python3 decode_conv.py
python3 data_utils.py
./train_model.sh
./train_model.sh test true

备注:大约5天训练时间,5个epoch,一个22小时左右
能给出相关答案。可尝试【你好。你叫什么名字?你喜欢我吗?】这样的问句。

参考:https://github.com/qhduan/Seq2Seq_Chatbot



-------英文Chatbot-------

cd ~/qa
git clone https://github.com/Conchylicultor/DeepQA.git
cd DeepQA
python3 -m nltk.downloader punkt
pip3 install django channels Redis asgi_redis
apt install -y redis-server

python3 main.py
#the trained model is in DeepQA/save/model, 
#we should copy it to DeepQA/save/model-server so that we can talk with chatbot in web interface.
cp -r save/model/* save/model-server

export CHATBOT_SECRET_KEY="my-secret-key"
cd chatbot_website/
python3 manage.py makemigrations
python3 manage.py migrate

redis-server &
python3 manage.py runserver

firefox: http://localhost:8000/

备注:cpu下大约需要训练2.5天,30个epoch,每个epoch需要1.5小时左右
有界面,可尝试【what's your name? how old are you?】这样的问句。 

参考:https://github.com/Conchylicultor/DeepQA


友情链接
ioDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信