您的位置:首页 > 编程语言

Github上Seq2Seq_Chatbot_QA中文语料和DeepQA英文语料两个对话机器人测试

2017-08-07 17:17 519 查看
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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐