0% found this document useful (0 votes)
471 views

Project Report AI Chatbot Covid 19

The document is a mini project report submitted by 4 students (Sujit Bhogil, Gurjeet Singh, Isha Awhale, and Rutuja Deshmukh) for their project titled "AI Chatbot For Covid 19". The project was guided by Dr. Reena Pagare of the Computer Science and Engineering department at MIT School of Engineering. The report includes an abstract, introduction, problem definition, features of the project, methodology used, outputs like screenshots and code, and a conclusion with plans for future enhancements.

Uploaded by

ISHA AWHALE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
471 views

Project Report AI Chatbot Covid 19

The document is a mini project report submitted by 4 students (Sujit Bhogil, Gurjeet Singh, Isha Awhale, and Rutuja Deshmukh) for their project titled "AI Chatbot For Covid 19". The project was guided by Dr. Reena Pagare of the Computer Science and Engineering department at MIT School of Engineering. The report includes an abstract, introduction, problem definition, features of the project, methodology used, outputs like screenshots and code, and a conclusion with plans for future enhancements.

Uploaded by

ISHA AWHALE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

MINI - PROJECT REPORT ON

“AI Chatbot For Covid 19”

BY

Group Members Seat Nos


1.Sujit Bhogil 2203512

2.Gurjeet Singh 2193106

3.Isha Awhale 2203532

4.Rutuja Deshmukh 2203527

Under the Guidance of

Dr. Reena Pagare

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

MIT SCHOOL of Engineering


Loni Kalbhor Pune
M.I.T. SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING
LONI – KALBHOR PUNE

CERTIFICATE

This is to

“AI Chatbot For Covid 19”

submitted by

Group Members Seat Nos


1.Sujit Bhogil 2203512

2.Gurjeet Singh 2193106

3.Isha Awhale 2203532

4.Rutuja Deshmukh 2203527

is a record of bonafide work carried out by them, under my guidance, in partial fulfillment of the
requirement for the Second Year of Engineering(Computer ) at M.I.T. School of Engineering, Pune
under MIT Art, Design & Technology University.

Date: Place: Loni Kalbhor

Dr. ReenaPagareDr. RajneeshKaurSachdeo

Guide, Dean Engineering,


Department of CSE Head , Department of CSE
M.I.T. School of Engineering MIT School of Engineering
Loni Kalbhor, Pune Loni-Kalbhor, Pune
ACKNOWLEDGEMENT

On this great occasion of accomplishment of our project onAI Chatbot For Covid 19 , we
would like to sincerely express our gratitude to Mrs. Dr Reena Pagarewho has been supported
through the completion of this project. 

We would also be thankful to our HOD Mrs.Dr. RajneeshKaurSachdeoof MIT ADT for providing all
the required facilities in completion of this project.

Finally, as one of the team members, I would like to appreciate all my group members for their
support and coordination, I hope we will achieve more in our future endeavours

Group Members

1.Sujit Bhogil

2.Gurjeet Singh

3.Isha Awhale

4.Rutuja Deshmukh
Contents

Sr. No. Contents Page No.

Abstract

List of Tables

List of Figures

1. INTRODUCTION

2. PROBLEM DEFINITION

3. FEATURES OF PROJECT

4. PLATFORM / TECHNOLOGY [Detailed


explanation of the technology or platform-
specific concepts with respect to project
implementation ]

5. FLOWCHART [for each module , explanation of


each module in one paragraph along with
flowchart , what is the input to the module, what
is the output of module ]

6. OUTPUT [Screenshots [explanation of each


screenshot in two to three lines]

7. CODE [proper commenting of code required,


Code should be module wise.]

8. REFERENCES

9. CONCLUSION AND FUTURE ENHANCEMENTS

Glossary

Reference & Bibliography


[References must be mentioned in IEEE format and must include
IEEE paper abstracts. References should include forward and
backward referencing]
Annexure A: Project Tracker or Jira Scrum Board

Annexure B:[Proof s of value addition}

Abstract

Artificial Intelligence has core branches like, Machine Learning which takes in data, searches
patterns, improves itself using the data, and displays the outcome. To lead healthy lifestyle
healthcare is very much important. In few unsocialized areas, it is quite hard to find a
consultation with a doctor that easily regarding health issues. The main idea here is to make a
healthcare chatbot based on Artificial Intelligence using NLP that can diagnose the disease and
provide required details about the specific disease before consulting or visiting a doctor. Reduces
the healthcare costs and improves accessibility to this medical chatbot. Specific chatbots act as
virtual medical assistance, which helps the patient know more about their disease and helps to
improve their health. The user can achieve the real benefit of a chatbot only when it can diagnose
all kinds of diseases and provide the necessary information. A text-to-text medical chatbot
involves patients in online conversation considering their health problems which provides a set
of personalized diagnoses based on their provided symptoms. These bots connect with the
potential patients visiting the site, helping them discover specialists, booking appointments, and
getting them access to correct treatment. This chatbot uses Natural language processing
techniques to process and analyze the data and give the output inappropriate manner. It brings up
the disease-related problems about whether the task mentioned above should be assigned to
human staff. This healthcare chatbot system will provide patients healthcare support online at all
times. It helps to generate health data and automatically delivers the information of reports to
medical management. By asking the questions in series it helps the patient by guiding what
exactly the user is looking for queries.

1. INTRODUCTION-:

The Current artificial intelligence has developed to a point where programs can learn by
the humans and effectively simplistic human conversations which is essential. One of the
best-known examples of chatbots in recent history is Siri the AI assistant that is part of
Apple's standard software for its products. Siri took chatbot mainstream in 2011. Since
then, brands in every sector have started to use them, eventually developing a new trend
conversational in user experience. This refers to an end-user experience in which your
interaction with a firm or service is automated based on user prior behaviour. If users are
developing artificial intelligence applications like Alexa, which enables the use of voice
to control devices. If you are a user, you can already interact with this Artificial
Intelligence chatbot on popular messaging platforms like Facebook, Instagram and so on.
Nowadays the use of chatbots has spread from user customer service to life and death
risks. Chatbots are coming into the healthcare industry and can help to solve health
problems. Health and fitness chatbots have begun to gain popularity in the market.
Previous year Facebook has started allowing healthcare industries to create Messenger
chatbots which would then communicate with users. A great example is Health Tap the
first company to release a health bot on the Messenger app. It allows users to ask their
medical-related queries and receive answers.
2. PROBLEM DEFINITION-:

 With the spread of COVID-19 across the world, there is a sense of panic and uncertainty
amongst the public.
 There is a need for health organizations to automate as many responses to these inquiries
as possible to free up human resources to deal with more complex problems in the fight
against this pandemic.

3. FEATURES OF PROJECT-:

A. Healthcare Chatbot System


Earlier, the artificial intelligence domain was not developed. After the invention of
chatbot systems, the problems of users are solved in less time. In the field of
healthcare, automated chatbot deployment in web applications is booming all over the
world. Patients suffers from different types of diseases and visit to hospital for
treatment purpose. Sometimes doctors are not available due to that, time required for
nursing takes a lot [1]. To overcome this issue, medical chatbots were developed.
These chatbots are trained and tested on live dataset also accuracy of the output is
relevant. The AI based chatbot are fast, reliable and precise. User provide the proper
details and receive feedback according to their query. If any user makes minor
mistake, the chatbot provides validation and autocorrection features. Nowadays, in
every clinics and hospitals portal chatbots are performing multitasking work. A lot of
time of patient is saved and tasks are completed in minimum effort.

B.Natural Language Processing

Natural Language Processing (NLP) is a domain of artificial intelligence that provides


machines to learn, read and understand the meaning of human languages. Different fields
such as Banking, Education, Finance and so on are using chat applications for solving
their problems and marketing their products. Majority of the countries like Germany,
Spain, China, India, Korea and so on have their own native language. While interacting
with other user, language barrier is created. To reduce this type of complication NLP
based autonomous provides variety of languages, which makes communication through
verbal and nonverbal easier [2].In the healthcare chatbot, NLP is used for text processing.

The characteristics of NLP in medical domain is useful:

1.SentenceTokenization:
In this method whole sentence is divided is into substrings and breaks into
smaller words. When a patient enters the query in form of sentences, a whole set
of words are converted into tokens, also split the sentences when there is
punctuation mark.
2. Word Tokenization:
There are varieties of words, whichare present in the dictionaries.The
segmentation of sentences is carried out. Words are assigned to tokens. The
chatbot helps to classify the words according to the category present in medical
records and gives the optimum feedback to a user.
3. Stemming and Lemmatization:
Stemming is process,where words are chopped out from beginning and end.
Whereas, lemmatization is used in morphological analysis for extraction of words.
When doctors entered the wrong data on their database, the responses of chatbot
are not relevant. These above techniques are used to correct the information and
give proper response to a patient in form of text.

4. PLATFORM / TECHNOLOGY -:

The proposed method for developing the systemconsist of web application. Firstly, chatbot is
createdwhich can help the users to get the symptoms of theirdiseases. Then we will add the
chatbot link over therespective hospital website which will help the otherpeople to gain the
information of medical reports[6].Database of the system helps to store therecords of the users.

We had train a chatbot using chatterbotlibrary and also train the bot to identify certain typesof
keywords in order to recognize the user's intent.This information shall then be forwarded to
thebackend. The chatbot can be trained to perform somelogical reasoning and responses without
referring tothe backend.The proposed method for developing the system consist of healthcare
application. It elaborates the business aspects of the proposed system. Firstly, chatbot is created
which can help the users to get the symptoms of their diseases.Then hospital website is
integrated which will help the other people to gain the information of hospital and their staff.
Database of the system helps to store the records of the users backend is responsible to use the
processed input from the chatbot and convert it into action to be performed in the database.

The proposed system is accessed by two entity namely, Admin and User. Admin needs to log in
with their login credentials.

5. FLOWCHART-:
From this flowchart are used to show the flow of message from one activity to the other activity.
Activityis the specific operation. The user will give the personal details such as name . Chatbot will ask
the symptoms from the user and by using natural processing language process it will respond to the
database and related question answer will be reflect.. The details will be stored in the database in will
reflect in command prompt .At last, the health care bot will provide the details and allow user to exit
the portal by ending up the conversation.

The healthcare chatbot is designed by using python in backend and user interface design
byJavaScript. For conversation between user and system the natural processing library is used
named chatterbot application runs in localhost ser appropriate details according to the user
queries. In training phase, the train.py file is and the new database is created. All the database
files are in xml format which are trained in the initial stage of the application model frontend
interface of the healthcare assistant is displayed on the localhost server and ready to solve the
patient symptoms on basis of a specific disease. At initial, the health assistant will take some
personal details of the user which will be stored the database. The diseases like headache, cough,
cold, etc are some diseases where user queries are inserted. For a doctor’s appointment, a
different data file is created. The training will help the bot to increase the accuracy of the
responses. Aft running the train.py file, it will load the all data into the MYSQL database and it
will create a new user [9]. After creating the new database, it will list all the data files and
training will be initiated.. That link consists of the chatbot web application be used by any
internet browser chrome, and so on

6. OUTPUT-:
7. CODE-:

import numpy as np

import google

import tensorflow as tf

import tflearn

import random

import nltk

from nltk.stem.lancaster import LancasterStemmer

stemmer = LancasterStemmer()

import json

import pickle
import warnings

warnings.filterwarnings("ignore")

print("Processing the Intents.....")

with open('intents.json') as json_data:

intents = json.load(json_data)

words = []

classes = []

documents = []

ignore_words = ['?']

print("Looping through the Intents to Convert them to words, classes,


documents and ignore_words.......")

for intent in intents['intents']:

for pattern in intent['patterns']:


w = nltk.word_tokenize(pattern)

words.extend(w)

documents.append((w, intent['tag']))

if intent['tag'] not in classes:

classes.append(intent['tag'])

print("Stemming, Lowering and Removing Duplicates.......")

words = [stemmer.stem(w.lower()) for w in words if w not in ignore_words]

words = sorted(list(set(words)))

print("Creating the Data for our Model.....")

training = []

output = []
print("Creating an List (Empty) for Output.....")

output_empty = [0] * len(classes)

print("Creating Traning Set, Bag of Words for our Model....")

for doc in documents:

bag = []

pattern_words = doc[0]

pattern_words = [stemmer.stem(word.lower()) for word in pattern_words]

for w in words:

bag.append(1) if w in pattern_words else bag.append(0)

output_row = list(output_empty)

output_row[classes.index(doc[1])] = 1
training.append([bag, output_row])

print("Shuffling Randomly and Converting into Numpy Array for Faster


Processing......")

random.shuffle(training)

training = np.array(training)

print("Creating Train and Test Lists.....")

train_x = list(training[:,0])

train_y = list(training[:,1])

print("Building Neural Network for Out Chatbot to be Contextual....")

print("Resetting graph data....")

tf.compat.v1.reset_default_graph()
net = tflearn.input_data(shape=[None, len(train_x[0])])

net = tflearn.fully_connected(net, 8)

net = tflearn.fully_connected(net, 8)

net = tflearn.fully_connected(net, len(train_y[0]), activation='softmax')

net = tflearn.regression(net)

print("Training....")

model = tflearn.DNN(net, tensorboard_dir='tflearn_logs')

print("Training the Model.......")


model.fit(train_x, train_y, n_epoch=1000, batch_size=8, show_metric=True)

print("Saving the Model.......")

model.save('model.tflearn')

print("Pickle is also Saved..........")

pickle.dump( {'words':words, 'classes':classes, 'train_x':train_x,


'train_y':train_y}, open( "training_data", "wb" ) )

print("Loading Pickle.....")

data = pickle.load( open( "training_data", "rb" ) )

words = data['words']
classes = data['classes']

train_x = data['train_x']

train_y = data['train_y']

with open('intents.json') as json_data:

intents = json.load(json_data)

print("Loading the Model......")

model.load('./model.tflearn')

import requests

def getCovidData(state,city):

r = requests.get("https://api.covid19india.org/state_district_wise.json")

data=r.json()[state]['districtData']['Pune']['delta']
return f'confirmed {data["confirmed"]} deceased {data["deceased"]}
recovered {data["recovered"]}'

def clean_up_sentence(sentence):

sentence_words = nltk.word_tokenize(sentence)

sentence_words = [stemmer.stem(word.lower()) for word in sentence_words]

return sentence_words

def bow(sentence, words, show_details=False):

sentence_words = clean_up_sentence(sentence)

bag = [0]*len(words)

for s in sentence_words:

for i,w in enumerate(words):

if w == s:

bag[i] = 1

if show_details:

print ("found in bag: %s" % w)


return(np.array(bag))

ERROR_THRESHOLD = 0.25

print("ERROR_THRESHOLD = 0.25")

def classify(sentence):

results = model.predict([bow(sentence, words)])[0]

results = [[i,r] for i,r in enumerate(results) if r>ERROR_THRESHOLD]

results.sort(key=lambda x: x[1], reverse=True)

return_list = []

for r in results:

return_list.append((classes[r[0]], r[1]))

return return_list

def response(sentence, userID='123', show_details=True):

results = classify(sentence)
if results:

while results:

if 'data-today' == results[0][0]:

state=input("Enter State")

city=input("Enter city")

return print(getCovidData(state,city))

for i in intents['intents']:

if i['tag'] == results[0][0]:

return print(random.choice(i['responses']))

results.pop(0)

class cdata():
name = "IDK"

data = cdata()

data.name=input("Your Name :- ")

while True:

input_data = input(f"{data.name} :- ")

answer = response(input_data)

answer

def do_AI(x,data):

if data.name == "IDK":

data.addName(input("Enter Your Name First : "))

print("hello mr." , data.name)

8..REFERENCES-:

 Jia, Jiyou. "CSIEC: A computer assisted English learning chatbot based on textual
knowledge and reasoning." Knowledge-Based Systems 22.4 (2009): 249-255. 

 Patel, Neelkumar P., et al. "AI and Web-Based Human-Like Interactive University
Chatbot (UNIBOT)." 2019 3rd International conference on Electronics, Communication
and Aerospace Technology (ICECA). IEEE, 2019. 
 Dharwadkar, Rashmi, and Neeta A. Deshpande. "A medical chatbot." Int J Comp Trends
Technol 60.1 (2018). 

 https://www.mordorintelligence.com/industry-reports/chatbot-market date -10/4/21021

9.CONCLUSION AND FUTURE ENHANCEMENTS


 Our application provide help to people for Covid Related Queries.

 Our application also can give the answer for normal queries.

 Our application also provide people a happy environment as it share cheerful video for
who has covid anxiety and Depression.

Advances in Natural Language Processing (NLP) have enabled conversational AI technologies


The intuitive interface of chatbots presents a low-friction approach to disseminate critical
information to vast populations

Future scope of the project could be AI Based Covid 19 chatbot system using NLP can also
include a mobile assistant in it which will be more functions will be added and can be accessed
by many users. Which will also reduce the time and will also be accurate in the health details of
patients given to the doctors. We can add biometric system for more secure authentication
process.
Reference & Bibliography-:

[1]"Real World Smart Chatbot for Customer Care using a Software as a Service (SaaS) Architecture
“Godson Michael D’silva1”, Sanket Thakare2, Shraddha More Available:
https://www.docme.ru/doc/2207164/i-smac.2017.8058261

[2] Divya Madhu, Neeraj Jain C. J, ElmySebastain, ShinoyShaji,AnandhuAjayakumar,” A Novel Approach


for Medical Assistance Using Trained Chatbot”, International Conference 2016. Available:
https://www.semanticscholar.org/paper/Anovelapproachformedicalassi
stancusingMadhuJain/b9117a428a35aca643f83e6986ae2 00807cba5c7

[3] YerlanJ Saurav Kumar Mishra, Dhirendra Bharti, Nidhi Mishra,” Dr.Vdoc: A Medical Chatbot that Acts
as a Virtual Doctor”, Journal of Medical Science and Technology Volume: 6, Issue 3, 2016. Available:
http://medicaljournals.stmjournals.in/index.php/RRJoMST/article/view /30

[4] PavlidouMeropi, Antonis S. Billis, Nicolas D.Hasanagas, CharalambosBratsas, Ioannis Antoniou,


Panagiotis D. Bamidis, ”Conditional Entropy Based Retrieval Model in Patient-Care Conversational
Cases”,2017 IEEE 30th International conference on Computer-Based Medical System.
Available:-https://ieeexplore.ieee.org/abstract/document/8104260

[5] Abbas SaliimiLokman, Jasni Mohamad Zain,FakultiSistemKomputer, KejuruteraanPerisian,” Designing


a Chatbot for Diabetic Patients”, ACM Transactions on Management Information Systems (TMIS),
Volume 4, Issue 2, August 2018. Available: http://ijircce.com/upload/2018/june/7_Pharmabot.pdf

[6] Nicolas D .Hasanagas, CharalambosBratsas, Ioannis Antoniou, Panagiotis D. Bamidis, ”Conditional


Entropy Based Retrieval Model in Patient-Care Conversational Cases”,2017 IEEE 30th International
conference on Computer-Based Medical System. Available: https://scholar.google.co.in/scholar?
q=International+conference+on+C omputerBased+Medical+System.&hl=en&as_sdt=0&as_vis=1&oi=sch
olart

[7] Kowatsch, T., VollanMobile Coach. In: Designingthe Digital Transformation. DESRIST 2017. Lecture
Notes in Computer Science, vol 10243, pp. 485-489. Springer, Berlin; Germany (2017). Available:
https://www.researchgate.net/publication/317181609_Design_and_Eva
luation_of_a_Mobile_Chat_App_for_the_Open_Source_Behavioral_Health_Intervention_Platform_Mob
ileCoach

[8] BenildaEleonor V. Comendador, Bien Michael B. Francisco, Jefferson S. Medenilla,Sharleen Mae T.


Nacion, “Pharmabot: A Pediatric Generic Medicine Consultant Chatbot “,Journal of Automation and
Control Engineering Vol. 3, No. 2, April 2015. Available:
http://www.joace.org/uploadfile/2014/0801/20140801025000959.pdf

[9] Ahmed Fadhil, “Beyond Patient Monitoring: Conversational Agents Role inTelemedicine& Healthcare
Support For Home-Living Elderly Individuals”, a researcharticle, April 2017.
Available :http://:www.researchgate.net/publication/323845985_Beyond_Patient
_Monitoring_Conversational_Agents_Role_in_Telemedicine_Healthca
re_Support_For_Home_Living_Elderly_Individuals.pdf

[10] Fadhil, Ahmed. ”Can a Chatbot Determine My Diet?: Addressing Challenges ofChatbot Application
for Meal Recommendation.” arXiv preprint arXiv:1802.09100(2018). Available:
http://:www.researchgate.net/publication/addressing_challanges_of_
chatbot_application_for_meal_recommendation.pdf

[11] Chatterbot library for natural language processing purpose


Available:-https://chatterbot.readthedocs.io/en/stable/corpus.html

[12] Healthcare chatbot system website interface template. Available:-https://hellotars.com/chatbot-


templates/healthcare/

[13] Doctors and Hospital database connectivity program structure. Available:-


https://www.w3resource.com/sql-exercises/hospital-database- sqlexercise-on-hospital-database.php
[14] Chatbot user interface guide by using front-end libraries.
Available:-https://www.userlike.com/en/blog/chatbot-ui
[15] Admin and user query form authentication.
Available:-https://www.php.net/manual/en/features.http-auth.php

[16] Flask framework tutorial roadmap for developing chatbot


Available:-https://beingdatum.com/build-a-chatbot-using-python-flask/

[17] Healthcare dataset in form of yml extension


Available:-http://www.lib4dev.in/info/awesomedata/awesome-publicdatasets/26898879

[18] Deployment of healthcare web application on localhost server tutorial


Available:-https://www.hostinger.in/tutorials/how-to-use-xampp-wordpress/

[19] Web application testing for creating final test cases reports of user interface guidance. Available:-
https://www.perfecto.io/blog/ui-testing-comprehensive-guide

You might also like