Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duguce/chatbotx
🏆 基于transformer的单轮对话中文聊天机器人
https://github.com/duguce/chatbotx
chatbot python3 tensorflow2 transformer
Last synced: 3 days ago
JSON representation
🏆 基于transformer的单轮对话中文聊天机器人
- Host: GitHub
- URL: https://github.com/duguce/chatbotx
- Owner: Duguce
- License: gpl-3.0
- Created: 2023-05-23T13:14:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-18T14:55:24.000Z (about 1 year ago)
- Last Synced: 2024-12-15T23:45:08.574Z (about 2 months ago)
- Topics: chatbot, python3, tensorflow2, transformer
- Language: Python
- Homepage:
- Size: 218 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ChatBotX
本项目是基于50w小黄鸡对话语料构建的Transformer生成式单轮对话模型。本项目受启发于另外一个使用seq2seq模型构建的[单轮对话模型](https://github.com/Schellings/Seq2SeqModel)。
目前模型的效果相对一般(具体效果如下图所示),待进一步完善...
## 项目结构
```shell
│ .gitignore
│ chat.py
│ config.py
│ data_processing.py
│ LICENSE
│ README.md
│ requirements.txt
│ train.py
│ train_helper.ipynb
│ transformer.py
│ utils.py
│
├─data
│ vocab.pkl
│ xhj_data.tsv
│
├─saved_models
```## 环境配置
环境配置只需要两个步骤:
- 下载项目文件
- 安装相关的第三方库具体步骤如下:
```
[email protected]:Duguce/ChatBotX.git && cd ChatBotX
pip install requirements.txt
```## 模型使用
- 生成词表
```
python data_processing.py
```- 模型训练
```
python train.py
```在进行模型训练之前,需要调整一下`config.py`中的参数设置。
- 模型预测
训练好的模型会保存在`saved_models`目录下。
- 体验交互式聊天
```
python chat.py
```## 开源协议
本仓库下的作品若无特殊说明均采用 [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) 开源协议进行许可