https://github.com/luopeixiang/simple_chatbot
A Simple ChatBot Based Encoder-Decoder
https://github.com/luopeixiang/simple_chatbot
attention-mechanism chatbots encoder-decoder-model pytorch-tutorial rnn
Last synced: 4 months ago
JSON representation
A Simple ChatBot Based Encoder-Decoder
- Host: GitHub
- URL: https://github.com/luopeixiang/simple_chatbot
- Owner: luopeixiang
- Created: 2019-02-23T15:20:47.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-23T15:33:59.000Z (almost 7 years ago)
- Last Synced: 2025-01-21T13:44:20.462Z (about 1 year ago)
- Topics: attention-mechanism, chatbots, encoder-decoder-model, pytorch-tutorial, rnn
- Language: Python
- Size: 870 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Simple ChatBot Based Encoder-Decoder
This is a implementation of simplified and modular version of pytorch [CHATBOT TUTORIAL](https://pytorch.org/tutorials/beginner/chatbot_tutorial.html)
## Data
`datasets/conversations.csv` contain formatted and preprocessed conversations from [Cornell Movie-Dialogs Corpus](https://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html).
## train model
`python3 main.py`
You can configure encoder-decoder model in `main.py`
## Evaluate model
Modify `model_path` variable in `evaluate.py` into your trained model path
Run `python3 evaluate.py` to chat with your trained model
**output example**:
```shell
Load checkpint...
Input> hello?
Chat_bot> hello .
Input> where am I?
Chat_bot> you re going to bed .
Input> how are you doing?
Chat_bot> fine .
Input> are you my friend?
Chat_bot> yes .
Input> you're under arrest
Chat_bot> you re not here .
Input> i'm just kidding
Chat_bot> no you re not .
Input> where are you from?
Chat_bot> i m here .
Input> it's time for me to leave
Chat_bot> i m sorry .
```