A simple chatbot powered by Pytorch & NPL.
Report Bug
·
Request Feature
Table of Contents
- The implementation should be easy to follow for beginners and provide a basic understanding of chatbots.
- The implementation is straightforward with a Feed Forward Neural net with 2 hidden layers.
Customization for your own use case is super easy. Just modify
intents.json
with possible patterns and responses and re-run the training.
This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
To get started with this project, follow the instructions below:
To run and work with this project you need to have the latest version of Python installed in your system.
Along with Python, we would also need some python modules to work with this project. Check Installation for instructions on same.
- Clone the repo
git clone https://github.com/mindninjaX/AI-Chatbot
- Install required packages using
pip install
pip install torch pip install numpy pip install nltk
- Uncomment
nltk.download()
& run nltk_utlis.py to install Punkt Tokenzier modelimport nltk nltk.download()
Run train.py
to train the chatbot
python train.py
This is create a new file data.pth
which contains the trained data for our chatbot.
Initiate the chatbot! Run chat.py
python chat.py
Raw data is present in intents.json
. Customize this file as per your needs. Just define a new tag
, possible patterns
, and possible responses
for the chat bot. You have to re-run the training whenever this file is modified.
{
"intents": [
{
"tag": "greeting",
"patterns": [
"Hi",
"Hey",
"How are you",
"Is anyone there?",
"Hello",
"Good day"
],
"responses": [
"Hey :-)",
"Hello, thanks for visiting",
"Hi there, what can I do for you?",
"Hi there, how can I help?"
]
},
...
]
}
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Twitter - @mindninjaX
- LinkedIn - linkedin/mindninjax
- Email - rishabh.singh@studentambassadors.com
Project Link: https://github.com/mindninjaX/AI-Chatbot