【文件属性】:
文件名称:silly-chatbot:使用PyTorch的序列到序列聊天机器人实现
文件大小:9.19MB
文件格式:ZIP
更新时间:2021-05-16 23:31:49
chatbot pytorch seq2seq Python
傻聊机器人
该存储库已停止维护,提供了新的项目链接:
要求
Python 2.7
火炬0.12
语料库
用法
预处理
python preprocess . py
此脚本将创建文件dialogue_corpus.txt在./data目录。
训练模式
python train . py
模型的超参数在配置文件config.json定义。 在我的本地环境(GTX1060)中,训练模型大约需要四个小时。
测验
python chatbot . py
测试例
> hi .
bot: hi .
> what's your name ?
bot: jacob .
> how are you ?
bot: fine .
> where are you from ?
bot: up north .
> are you happy today ?
bot: yes .
聊天机器人可以回答这些
【文件预览】:
silly-chatbot-master
----.gitignore(1KB)
----custom_token.py(49B)
----data()
--------movie_conversations.txt(6.45MB)
--------movie_lines.txt(33.04MB)
----data_utils.py(7KB)
----LICENSE(34KB)
----test_questions.txt(81B)
----README.md(1KB)
----masked_cross_entropy.py(2KB)
----preprocess.py(2KB)
----model_utils.py(6KB)
----chatbot.py(710B)
----config.json(828B)
----model.py(8KB)
----train.py(3KB)