Skip to content

I have made this Chat Assisstant in reference to Thapar University genral FAQ

Notifications You must be signed in to change notification settings

kritsid/ThaparBot

Repository files navigation

ThaparBot

LIVE DEMO AVAILABLE HERE:

https://thapar-bot2.herokuapp.com/

DISCRIPTION:

In this project, I have tried to make a chat assisstant for our college. This system can be embedded to the college website and can help in resolving people's general queries.

WORKING

ML model has been initially trained in train.ipynb file. In this, i have preprocessed the data(textual data in form of intents). Once it is preprocessed, i have divided it into training and testing sets. After that I have made a Neural Netwrok Model to train the training data.The trained model has been saved and used furthur. Then I have used Pickle to get the response for new intents.

PREPROCESSING ELABORATED:

To preprocess the data, following has been done in the same sequence:

TOKENIZATION

CREATED A CORPUS IN THE FORM => (['list of words'], intent) EG: (['hi'],greet)

LEMMAIZATION

LOWERCASE

DUPLICATE REMOVAL

BAG OF WORDS

neural networds model

model = Sequential()

model.add(Dense(128, input_shape=(len(train_x[0]),), activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(64, activation='relu'))

model.add(Dropout(0.5))

model.add(Dense(len(train_y[0]), activation='softmax'))

Compiling model. SGD with Nesterov accelerated gradient gives good results for this model

sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)

model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])

ABOUT DATASET:

For this bot system, i have manually created the dataset. Since it is manual, it is a very small dataset in form of questions and responses.

METHODOLGY:

flow2 (1)


project3

IO IMAGES:

image

image

HOW TO RUN LOCALLY:

install the requirements using: pip install -r requirements.txt model has been trained and stored in train.ipynb since it is a flask app, run app.py to run this locally.

About

I have made this Chat Assisstant in reference to Thapar University genral FAQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published