A simple bot made using NLP, Seq2Seq and Deep Learning using Tensorflow.
- Python 3 (Anaconda Recommended)
- Tensorflow 0.12.1
- Flask 0.12.2
- Postman
-
Clone this repo using git bash or download the .zip file and extract it.
-
Download the pre-trained weight folder and place it inside the source folder.
-
Create a new environment using bash (in Mac) or anaconda prompt (in windows)
conda create -n deeplearning-bot pyhton=3.6 anaconda
-
Install Tensorflow and Flask.
pip install tensorflow=0.12.1 && pip install flask
-
cd into the chat bot directory ./the-deeplearning-bot/api and run:
pyhton api.py
-
Open Postman
GET 127.0.0.1:5000/
##Usage
-
Install curl
-
run the following commands:
curl http://127.0.0.1:5000/
curl -H "Content-type: application/json" -X POST http://127.0.0.1:5000/message -d '{"message":"Hello Data"}'
Feel free to for this repo and make changes and explore it. You can add new features to this bot. Always open for feedbacks and upgrade. ;)
This bot is inspired from Suriyadeepan's practical_seq2seq
The MIT License
Copyright (c) 2018 Cruxbreaker.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.