Projects

Creating a Chat bot from scratch and deploying it on Heroku

Figures

This figure describes our raw dataset

Data Cleaning and initialization parts

Now our data is almost ready

One-Hot Encoding technique

One-hot encoding transforms our data into binary - vectors which can be given to the algorithm.


Creating The ANN Model

We are using relu and the weight initialization technique is 'he_uniform' as it works good with relu activation function and softmax activation function is used in the output layer.

Model saved as .h5 and loaded in app.py

Now we will do the prediction of our user queries in app.py and all the flask code is in app.py

app.py - prediction + flask web app

we have created restful API using flask and created a routing system. and it is also a dynamic URL.  we will also convert the spaces in user query into + character.

Getting the Prediction

Again the user query will be converted into binary form and the output will be given. Now we will select the class with highest probability.

Returning as a JSON object

As we know the correct class for that question so now we will collect the response from the intents.json and give it back to the user as a JSON object.

Android app- GET request

We have created a simple android app where the user can give voice / text input and then the string is used for API calling. All the networking part is done by Volley Library. And the result is displayed in the text view along with the voice output.

Demo Video

Click on the above video to watch. You can go to my youtube channel 'THE CODE BLOODED' by clicking on the link below