Health and Med Tech Sadhana
Health and Med Tech Sadhana
A PROJECT REPORT
Submitted by
SADHANA.S (211120104015)
TRISHA.R (211120104020)
SOWMIYA.Y (211120104017)
GOWTHAM.S (211120104317)
of
BACHELOR OF ENGINEERING
IN
1
BONAFIDE CERTIFICATE
Certified that this project report “ HEALTH & MED TECH: AI BASED
DISEASE PREDICTION USING MACHINE LEARNING” is the bonafide
work of SADHANA.S(211120104015), TRISHA.R(211120104020),
SOWMIYA.Y(211120104017) , GOWTHAM.S(211120104317) who carried
out the project work under my supervision. Certified further, that to the best of
my knowledge the work reported here in does not form part of any other project
report or dissertation on the basis of which a degree or award was conferred on
an earlier occasion or any other candidate.
SIGNATURE SIGNATURE
Kundrathur,Chennai-600069 Kundrathur,Chennai-600069
2
Internal Examiner External Examiner
ACKNOWLEDGEMENT
First of all we pay our grateful thanks to the chairman Ln.Dr.S.Peter for
introducing the Engineering College in Kundrathur.
We would like to thank the Director Er.A.Prakash, for giving us support and
valuable suggestion for our project.
It is with great pleasure and privilege we express our sincere thanks and
gratitude to Dr.Venugopalakrishnan , M.E.,M.B.A.,Ph.D., Principal, for the
spontaneous help rend to us during our study in this college.
We would like to thank all the teaching and non-teaching STAFF MEMBERS
& friends of the Computer Science Engineering Department for giving the
support and valuable suggestions for our Project work.
3
ABSTRACT
4
increasingly adept at forecasting potential illnesses, enabling early intervention
and personalized healthcare.
TABLE OF CONTENTS
1. INTRODUCTION 8
2. SYSTEM ANALYSIS 9
2.1 Existing system
2.2 proposed system
3. LITERATURE SURVEY 11
4. SYSTEM SPECIFICATION 13
4.1 Software Requirement
4.2 Hardware Requirement
5. SYSTEM DESIGN 20
5.1 Use Case Diagram
5.2 Sequence Diagram
5.3 Class Diagram
5.4 Activity Diagram
5.5 Flow Chart Diagram
5.6 UML Diagram
26
5
6.MODULUS DESCRIPTION
6.1 Login
6.2 Sign Up
6.3 Home page
6.4 MongoDB
6.5 Information Retrieval
6.6 Speech Recognition
7. CODING 30
8. SCREENSHOT 58
9. CONCLUSION 63
11. REFERENCES 66
6
LIST OF FIGURES
7
CHAPTER 1
INTRODUCTION
8
ARTIFICIAL INTELLINGENCE:
9
2.1.1. Features of Deep Learning:
Deep learning systems can perform feature extraction automatically, meaning they
don't require supervision to add new features.
Deep learning systems can process both structured and unstructured data.
Accuracy
Deep learning systems can analyse large amounts of data and uncover complex
patterns in images, text and audio and can derive insights that it might not have been
trained on.
1) Supervised Learning
Supervised learning is a type of machine learning where the algorithm is trained on a
labeled dataset, which means that the input data is paired with the corresponding correct
output. In other words, the algorithm is provided with input-output pairs, and the goal is to
learn a mapping function from the input to the output.
In the context of deep learning, which is a subfield of machine learning, supervised
learning involves using neural networks to learn complex mappings from inputs to outputs.
These neural networks are composed of layers of interconnected nodes (neurons) that process
the input data and produce an output. During the training process, the network adjusts its
internal parameters (weights and biases) based on the difference between its predictions and
the true outputs in the labeled training data.
10
Supervised learning in deep learning is widely used in various applications, such as
image recognition, natural language processing, speech recognition, and many others. It is
called "supervised" because the process involves a "teacher" (the labeled data) guiding the
learning algorithm to make accurate predictions.
2) Unsupervised Learning
Clustering
Dimensionality Reduction
Generative Models
2.2. Random Forest
Random Forest is a powerful ensemble learning algorithm used for both classification and
regression tasks in machine learning. It operates by constructing a multitude of decision trees
during the training phase and outputs the mode of the classes for classification tasks or the
mean prediction for regression tasks. The name "Random Forest" stems from the idea that
each decision tree is built using a random subset of the features and a random subset of the
training data.
11
Random Feature Subsets: During the construction of each decision tree, a random subset of
features is considered for each split. This helps in decorrelating the trees and prevents
overfitting by ensuring that no single feature dominates the decision-making process.
Random Data Subsets (Bootstrap Aggregating): Each tree in the forest is trained on a
random subset of the training data. This process, known as bootstrapping, involves sampling
with replacement from the original dataset. It introduces diversity into the training process,
making the model more robust.
Voting or Averaging: For classification tasks, the class that receives the majority of votes
from the individual trees is selected as the final prediction. For regression tasks, the mean of
the individual tree predictions is taken.
Highly Scalable: Random Forest is parallelizable and can handle large datasets with high
dimensionality. It is also less prone to overfitting compared to individual decision trees.
Robust to Noisy Data: The randomness in feature and data sampling makes Random Forest
robust to noisy data and outliers.
Feature Importance: Random Forest provides a measure of feature importance, indicating
which features contribute more to the predictive performance of the model.
Wide Applicability: Random Forest is widely used in various domains, including finance,
healthcare, and cybersecurity, due to its versatility and ability to handle different types of
data.
Decision Trees are powerful and intuitive machine learning algorithms that are widely used
for classification and regression tasks. They work by recursively partitioning the feature
space into smaller regions, based on the values of input features, until a certain stopping
criterion is met. Here's a more elaborate exploration of Decision Trees:
Tree Structure: A Decision Tree consists of nodes, branches, and leaves. Each node
represents a decision based on a feature, with branches representing the possible outcomes of
that decision, and leaves representing the final predictions or classifications
Splitting Criteria: At each node of the tree, the algorithm selects the feature and
corresponding threshold that best separates the data into distinct classes or values. This
selection is typically based on criteria such as Gini impurity, entropy, or information gain,
aiming to maximize the homogeneity of data within each partition.
12
Recursive Partitioning: The tree-building process continues recursively, with each node
further partitioning the data until a stopping criterion is reached. This could be a maximum
depth limit, a minimum number of samples required to split a node, or when all samples at a
node belong to the same class.
Predictions: Once the tree is built, new instances are classified by traversing the tree from
the root node to a leaf node, following the decision rules at each node. The class label
assigned to the leaf node reached by the instance determines the prediction.
Interpretability: One of the key advantages of Decision Trees is their interpretability. The
decision paths followed by the tree provide insights into the underlying data patterns and
feature importance, making them particularly valuable for understanding the decision-making
process.
Handling Categorical and Numerical Data: Decision Trees can handle both categorical and
numerical features naturally. For categorical features, the tree performs a binary split based
on each category. For numerical features, it selects the threshold that best separates the data
into two groups.
Ensemble Methods: Decision Trees can also be used as building blocks in ensemble
methods such as Random Forests and Gradient Boosting Machines, where multiple trees are
combined to improve predictive performance and robustness.
Overfitting: A common challenge with Decision Trees is overfitting, where the model
captures noise in the training data and performs poorly on unseen data. Techniques such as
pruning, setting minimum sample requirements for splitting, and limiting tree depth help
mitigate overfitting.
2.1. KNN
K-Nearest Neighbors (KNN) is a non-parametric and instance-based machine learning
algorithm used for classification and regression tasks. It operates by assigning a class label or
predicting a value for a new data point based on the majority class or average value of its
nearest neighbors in the feature space. The "K" in KNN refers to the number of neighbors
considered for prediction, and it is a hyperparameter that needs to be specified beforehand.
KNN is simple to understand and implement, making it particularly suitable for small
to medium-sized datasets. However, it can be computationally expensive, especially with
large datasets, as it requires storing all training data and calculating distances for each
prediction. Additionally, the performance of KNN can be sensitive to the choice of distance
metric and the value of K. Despite these limitations, KNN remains a versatile and effective
13
algorithm, especially in situations where data distribution is non-linear or when
interpretability is essential.
14
overview of the machine learning applications in healthcare. Apart from revealing the
potential of machine learning in healthcare, this paper will serve as a motivation to foster
advanced research in the domain of machine intelligence-driven healthcare.
[2] Title Disease Prediction Using Data Mining and Machine Learning Techniques
Authors: Shantala Giraddi
Description:
In the current global scenario of modern times with people leading a highly
mechanized life under stressful work pressure, at home as well as in the workplace, they are
prone to several diseases. Such conditions are increasing at an alarming rate from the recent
past. Hence, the healthcare industry needs to take a prominent place soon, responsible for the
health of people, for a better society and a prosperous nation at large. Healthcare costs are
increasing with the growing demand for medical facilities. There is a critical need for
healthcare facilities with improvised detection, diagnosis, and treatment methods. With
increased digitization and computation technologies in place, an enormous volume of data is
being produced and utilized for diagnosis and detection techniques. This data could be
utilized to retrieve data for forecasting ailments of a disease, initiating preventive measures
and improvising treatment methods, much before the advancement of the diseases. It is
essential that how best the intelligence of prediction and decision-making ability validated by
an expert is built using sophisticated computation technologies. The state-of-art data mining
techniques are applied to the gathered massive data to have a thorough analysis of the
patterns that can provide essential and critical indicators about the presence and advancement
of the disease condition. Data mining techniques are a boon to medical science, which has
simplified the data analysis process for enabling a medical expert to take a timely decision for
initiating the right treatment. Thus, it can save the patient suffering from undue delays caused
by several tests that need to be conducted and to decide on a treatment method. The proposed
work emphasizes on the use of data mining techniques, namely, decision tree, Naive Bayes,
random forest, and logistic regression, for detecting cancer and brain tumor, using machine
learning ability on the standard databases from Kaggle. The performance measures of
detection using data mining techniques are entirely satisfactory. The accuracy measures of
cancer detection on the standard database are attained using decision tree, Naive Bayes,
random forest, and logistic regression as 93.86%, 95.61%, 95.80%, and 98.25%, respectively.
The accuracy measures of detection of brain tumor disease on the standard database are
15
attained using decision tree, Naive Bayes, random forest, and logistic regression as 97.21%,
97.21%, 99.04%, and 98.14%, respectively.
[3] Title: Machine learning algorithms for smart and intelligent healthcare system in Society
5.0
Authors: Deepesh Rawat
Description:
The pandemic has shown us that it is quite important to keep track record our health
digitally. And at the same time, it also showed us the great potential of Instruments like
wearable observing gadgets, video conferences, and even talk bots driven by artificial
intelligence (AI) can provide good care from remotely. Real time data collected from
different health care devices of cases across globe played an important role in combatting the
virus and also help in tracking its progress. The evolution of biomedical imaging techniques,
incorporated sensors, and machine learning (ML) in recent years has led in various health
benefits. Medical care and biomedical sciences have become information science fields, with
a solid requirement for refined information mining techniques to remove the information
from the accessible data. Biomedical information contains a few difficulties in information
investigation, including high dimensionality, class irregularity, and low quantities of tests. AI
is a subfield of AI and computer science which centric the utilization of information and
calculations to impersonate the way that people learn, steadily further developing its
accuracy. ML is an essential element of the rapidly growing area of information science.
Calculations are created using measurable procedures to make characterizations or forecasts,
exposing vital experiences inside information mining operations. In this chapter, we explain
and compare the different algorithms of ML which could be helpful in detecting different
disease at earlier stage. We summarize the algorithms and different steps involved in ML to
extract information for betterment of the society which is already exposed to the world of
data.
16
[4] Title: Symptoms Based Disease Prediction Using Machine Learning Techniques
Authors: P. Hamsagayathri
Description:
Computer Aided Diagnosis (CAD) is quickly evolving, diverse field of study in
medical analysis. Significant efforts have been made in recent years to develop computer-
aided diagnostic applications, as failures in medical diagnosing processes can result in
medical therapies that are severely deceptive. Machine learning (ML) is important in
Computer Aided Diagnostic test. Object such as body-organs cannot be identified correctly
after using an easy equation. Therefore, pattern recognition essentially requires training from
instances. In the bio medical area, pattern detection and ML promises to improve the
reliability of disease approach and detection. They also respect the dispassion of the method
of decisions making. ML provides a respectable approach to make superior and automated
algorithm for the study of high dimension and multi - modal bio medicals data. The relative
study of various ML algorithm for the detection of various disease such as heart disease,
diabetes disease is given in this survey paper. It calls focus on the collection of algorithms
and techniques for ML used for disease detection and decision making processes.
[5] Title: Computational Methods for Predicting Chronic Disease in Healthcare Communities
Authors: S.N Induja
Description:
A computational model designed on the basis of big data analytics has a vast
application in medical field. The chronic disease like cerebral stroke results in demises of
large number of human lives in an unpredicted way. Hence it is very important to have a
prediction model to reduce the impact of such issues. The accuracy of the prediction model is
purely based on the potential to extract the unique valid features from the dataset used in
prediction. In this analytical study, we collected both structured and unstructured data from
National Stroke Mortality dataset. Ten-fold cross validation was performed to both training
and test sets. We proposed three classifiers such as Naive Bayes, K-Nearest Neighbor and
Decision tree to predict the risk of stroke. As it is a life saving problem, the outcome of the
model was evaluated on the basis of various performance and performance error measures. In
order to prove the accuracy of the models, we made comparison with existing works and
reached to a result that the decision tree shows a better performance than other models.
17
CHAPTER 2
PROBLEM STATEMENT
In the existing system, disease diagnosis often relies heavily on clinician expertise and
standardized diagnostic criteria, leading to variability in accuracy and timeliness across
different healthcare settings. Traditional approaches typically involve manual analysis of
patient data, which can be time-consuming and prone to errors. Moreover, the complexity and
interplay of various factors influencing disease manifestation make it challenging to achieve
consistently reliable predictions. While some computational models exist for disease
prediction, they often lack the sophistication and adaptability needed to handle the diverse and
dynamic nature of healthcare data. Consequently, there is a pressing need for an automated
system that can harness the power of machine learning and artificial intelligence to provide
more precise, timely, and personalized disease predictions, thereby revolutionizing the
landscape of healthcare delivery.
18
prediction. While some healthcare institutions have implemented rudimentary machine
learning algorithms for predictive analytics, these systems are often limited in scope and
effectiveness due to factors such as data quality, model generalizability, and interpretability.
Furthermore, the absence of real-time monitoring and feedback loops impedes the continuous
improvement of predictive models and their applicability in dynamic clinical settings. As a
result, there is a critical need for a more advanced and scalable AI-based solution that can
seamlessly integrate disparate data sources, adapt to evolving healthcare challenges, and
empower clinicians with actionable insights for early disease detection and management.
Disadvantages:
Models may produce false positives or false negatives, impacting their reliability and
potentially affecting patient outcomes.
AI models heavily rely on training data, which may reflect biases inherent in
healthcare practices, such as underrepresentation of certain demographic groups or
overemphasis on specific diagnostic criteria. This can lead to skewed predictions and
exacerbate healthcare disparities.
The utilization of vast amounts of patient data raises significant privacy concerns,
particularly regarding the security and confidentiality of sensitive medical
information. Mishandling or unauthorized access to this data could result in breaches
of patient privacy and regulatory non-compliance.
19
Complex machine learning algorithms may lack transparency and interpretability,
making it difficult for healthcare providers to understand the reasoning behind
predictions. This opacity can erode trust in the system and hinder acceptance among
clinicians and patients.
AI-driven disease prediction raises ethical dilemmas regarding the appropriate use of
predictive analytics in healthcare decision-making. For instance, there may be concerns
about preemptive interventions based solely on statistical probabilities, potentially
leading to unnecessary treatments or undue anxiety for patients.
Overreliance on AI for disease prediction could diminish the role of clinical judgment
and human expertise in healthcare decision-making. This dependency may reduce
opportunities for critical thinking and holistic patient care, particularly if clinicians
become overly reliant on algorithmic outputs.
20
PROPOSED SYSTEM
The project entails comprehensive data enhancement strategies aimed at
enriching diverse and high-quality medical data, complemented by the integration of
advanced machine learning algorithms to ensure precise disease prediction. Key
features include facilitating patient records access, appointment scheduling, and result
visualization for enhanced patient care. Additionally, real-time monitoring
mechanisms will be implemented to track model performance and facilitate timely
data updates, with automated alerts to flag any anomalies. Furthermore, the design
emphasizes scalability to effectively manage the growing volumes of data, ensuring
the system's capability to adapt and evolve with changing requirements and increasing
demand.
21
in the system and promote collaboration between AI algorithms and healthcare
practitioners, leading to more informed clinical decision-making.
22
institutions, we can leverage collective intelligence and accelerate
advancements in disease prediction and treatment.
4.1.1. ADVANTAGES
Using machine learning helps find health issues early, so doctors can act
quickly and improve treatment.
It lets doctors create personalized plans based on your health information,
making healthcare more customized.
Machine learning helps hospitals use their resources wisely by focusing
on areas or people at higher risk, making healthcare more efficient.
Early Disease Detection: By analyzing diverse patient data sources,
including genetic information, environmental factors, and health records,
the system can identify subtle patterns and risk factors indicative of
disease onset at an early stage. This enables proactive interventions and
23
preventive measures to mitigate disease progression and improve patient
outcomes.
Personalized Healthcare: The system generates personalized predictions
tailored to individual patient profiles, considering unique genetic,
lifestyle, and environmental factors. This personalized approach enables
healthcare providers to deliver targeted interventions and treatment plans
that optimize efficacy and minimize adverse effects.
Improved Clinical Decision-Making: With intuitive visualization tools
and real-time analytics, clinicians gain access to actionable insights at the
point of care, facilitating informed decision-making and treatment
planning. The system provides clinicians with evidence-based
recommendations and alerts, enhancing diagnostic accuracy and
treatment efficacy.
Enhanced Patient Engagement: Through mobile applications and
telehealth platforms, patients can actively engage with their health data,
track their progress, and receive personalized recommendations for
preventive care and lifestyle modifications. This fosters patient
empowerment and self-management, leading to better adherence to
treatment plans and improved health outcomes.
Efficiency and Cost Savings: By streamlining diagnostic workflows and
facilitating early intervention, the system reduces healthcare costs
associated with late-stage disease management and hospitalizations.
Moreover, predictive analytics enable resource allocation optimization
and risk stratification, enhancing operational efficiency and resource
utilization within healthcare systems.
Interoperability and Collaboration: The system facilitates interoperability
with external healthcare systems and research databases, enabling
seamless data exchange and collaboration across institutions. This
promotes knowledge sharing, fosters research collaborations, and
accelerates advancements in disease prediction and treatment.
Ethical and Regulatory Compliance: With robust privacy and security
measures in place, the system ensures compliance with regulatory
standards such as GDPR and HIPAA, safeguarding patient privacy and
24
confidentiality. Moreover, the transparent and interpretable nature of the
system enhances trust among patients and healthcare providers, fostering
ethical and responsible AI deployment in healthcare.
Overall, the proposed AI-based disease prediction system offers a
transformative approach to healthcare delivery, leveraging advanced
technology to enhance early detection, personalized treatment, and
patient engagement while optimizing clinical workflows and resource
utilization.
Certainly, here are some additional advantages of the proposed AI-based
disease prediction project:
25
supports population health management initiatives. It enables healthcare
organizations to allocate resources strategically, implement targeted
interventions, and monitor health outcomes at a community level,
ultimately improving the health and well-being of entire populations.
26
CHAPTER 4
DEVELOPMENT PROCESS
4.2.1. PYTHON:
For example, x=10 .Here, x can be anything such as String, int, etc.
Python is an interpreted, object-oriented programming language similar
to PERL, that has gained popularity because of its clear syntaxand readability.
Python is said to be relatively easy to learn and portable, meaning its statements
can be interpreted in a number of operating systems, including UNIX-based
systems, Mac OS, MS-DOS, OS/2, and various versions of Microsoft Windows
98. Python was created by Guido van Rossum, a former resident of the
Netherlands, whose favourite comedy group at the time was Monty Python's
Flying Circus. The source code is freely available and open for modification and
reuse. Python has a significant number of users.
Features in Python
There are many features in Python, some of which are discussed below
27
Easy to code
Free and Open Source
Object-Oriented Language
GUI Programming Support
High-Level Language
Extensible feature
Python is Portable language
Python is Integrated language
Interpreted Language
4.3. ANACONDA
The big difference between anaconda and the pip package manager is in
how package dependencies are managed, which is a significant challenge for
Python data science and the reason anaconda exists.
28
In contrast, anaconda analyses the current environment including
everything currently installed, and, together with any version limitations
specified (e.g. the user may wish to have Tensorflow version 2,0 or higher),
works out how to install a compatible set of dependencies, and shows a warning
if this cannot be done.
Custom packages can be made using the anaconda build command, and
can be shared with others by uploading them to Anaconda Cloud, PyPI or other
repositories.
29
Anaconda Repository, install them in an environment, run the packages and
update them. It is available for Windows, macOS and Linux.
JupyterLab
Jupyter Notebook
QtConsole
Spyder
Glue
Orange
RStudio
Visual Studio Code
30
The Notebook interface was added to IPython in the 0.12
release[14] (December 2011), renamed to Jupyter notebook in 2015 (IPython 4.0
– Jupyter 1.0). Jupyter Notebook is similar to the notebook interface of other
programs such as Maple, Mathematica, and SageMath, a computational
interface style that originated with Mathematica in the 1980s. According to The
Atlantic, Jupyter interest overtook the popularity of the Mathematica notebook
interface in early 2018.
HARDWARE REQUIREMENTS:
31
4.2. SYSTEM ARCHITECTURE
SYSTEM MODULES:
32
Module 1: Doctor
Module 2: Patient
Module 1: Doctor
Module 1: Patient
33
privacy and compliance with regulatory standards such as GDPR and HIPAA,
we aim to instill confidence among patients and healthcare providers in the
confidentiality and integrity of their health information.
4.2.1. ADVANTAGES
Using machine learning helps find health issues early, so doctors can act
quickly and improve treatment.
It lets doctors create personalized plans based on your health information,
making healthcare more customized.
Machine learning helps hospitals use their resources wisely by focusing on
areas or people at higher risk, making healthcare more efficient.
34
financial offerings. With Scheme Setu, our aim is to transform how individuals
interact with and access government services, fostering financial literacy and
promoting inclusivity in financial matters.
35
Abstract: In the last decade, conversational agents have been developed and
adopted in several application domains, including education, healthcare,
finance, and tourism. Nevertheless, chatbots still need to address several
limitations and challenges, especially regarding personalization, limited
knowledge-sharing capabilities, multi-domain campaign support, real-time
monitoring, or integration of chatbot communities. To cope with these
limitations, many approaches based on multi-agent systems models and
technologies have been proposed in the literature, opening new research
directions
USER in this context. The results of this review are intended to provide
interface
researchers, software engineers, and innovators with a complete overview of the
current state of the art and a discussion of the open challenges.
CHAPTER 4
SYSTEM SPECIFICATION
Natural language
processing
Message
platform
Chat logic
MONGO DB
Information
sources
36
Fig 4.1 System Specification
37
4.1 SOFTWARE REQUIREMENTS
MongoDB
NODE JS
JavaScript
HTML,CSS
WINDOWS 10 OS
VS CODE
CHROME BROWSER
MONGODB:
38
makes it a popular choice for a wide range of applications, from web and
mobile development to real-time analytics and content management systems.
NODE JS:
These are just a few examples of the types of applications you can
build using Node.js. Its versatility and extensive ecosystem of
39
modules and libraries make it a popular choice for a wide range of
development projects.
JAVASCRIPT:
Web Development
Server-side Development
Web Servers
API Development
Data Visualization
Browser Extensions
40
Chatbots
VS CODE:
41
Task Runners
Text Editing and Productivity Tools
4.2HARDWARE REQUIREMENTS
Servers/Computers
Processor (CPU)
Memory (4GB RAM)
Storage (HDD/SSD)
Networking Equipment
GPU (Graphics Processing Unit)
Microphones and Speakers
Power Supply Units (PSUs)
42
STORAGE (HDD/SSD): Storage is required to store the chatbot's code,
training data, user logs, and other related files. Solid-state drives (SSDs) are
preferable for faster read/write speeds, which can improve the performance of
the chatbot.
POWER SUPPLY UNITS (PSUS): Reliable power supply units are essential
to ensure uninterrupted operation of the chatbot hardware. Redundant power
supplies or uninterruptible power supplies (UPS) can provide backup power in
case of outages.
43
44
CHAPTER 5
SYSTEM DESIGN
45
5.2 SEQUENCE DIAGRAM
46
5.3 CLASS DIAGRAM
47
1.4ACTIVITY DIAGRAM
48
5.5 FLOWCHART DIAGRAM
49
5.6 UML DIAGRAM
50
CHAPTER 6
MODULUS DESCRIPTION
"Our login page securely retrieves user credentials from our MongoDB
database, ensuring data integrity and confidentiality. Users simply input their
username and password, which are then verified against the stored records in
our database. This seamless process guarantees a reliable and secure
authentication experience, maintaining the privacy and security of our
users' accounts." Our sign-up page is the entry point for users to create accounts
on a platform. It typically features a registration form for users to input essential
information like name, email, and password. The page also includes links to
privacy policies and terms of service, options for CAPTCHA or verification to
prevent spam, and may offer the convenience of signing up with external
accounts like Google or Facebook. It should be designed for accessibility and
ease of use, with clear error handling and support options available.
Our signup page offers a streamlined process for new users to create their
accounts with confidence. Users are prompted to provide their first name, last
name, password, and confirm password. To ensure the utmost security,
passwords are encrypted using the encrypt hashing algorithm before being
stored in our MongoDB database. This industry-standard encryption method
safeguards user data against unauthorized access, guaranteeing the
confidentiality and integrity of their account information. With our commitment
to protecting user privacy, our signup page provides a secure foundation for
51
users to join our platform and experience peace of mind in their
online interactions.
6.4 MONGODB
52
pricing model based on usage and provides seamless integration with other
cloud services and platforms. MongoDB Atlas is a fully managed cloud
database service provided by MongoDB.
53
Fig 6.6 Information Retrieval
54
Fig 6.6 Speech Recognition
CHAPTER 7
CODING
SAMPLE CODING
Chat.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Chatbot</title>
<link rel="stylesheet" href="style.css">
</head>
<style>
body {
font-family: Arial, sans-serif;
justify-content: center;
align-items: center;
margin-top: 10%;
}
.chat-container {
max-width: 600px;
margin: 20px auto;
55
box-sizing: border-box;
border: 2px solid #000000;
box-shadow: 2px 5px 40px 40px rgb(92, 235, 63);
border-radius: 5px;
padding: 10px;
}
.chat-box {
height: 500px;
overflow-y: scroll;
border-bottom: 1px solid #ccc;
padding-bottom: 10px;
color: white;
display: flex;
flex-direction: column;
align-items: flex-start;
width: 100%;
margin-bottom: 10px;
}
.message {
margin: 10px;
padding: 8px 12px;
border-radius: 8px;
word-wrap: break-word;
}
.user {
align-self: flex-end;
56
color: white;
padding: 10px;
border-radius: 10px;
margin-bottom: 5px;
.bot {
align-self: flex-start;
background-color: #28a745;
padding: 10px;
border-radius: 10px;
margin-bottom: 5px;
input[type="text"] {
padding: 5px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans
Unicode', Verdana, sans-serif;
57
}
button {
background-color: #007bff;
color: #fff;
border: none;
cursor: pointer;
h1 {
font-size: 30px;
display: flex;
justify-content: center;
background: #17928e;
#speak{
margin-left:220px ;
margin-top: 40px;
width: 100px;
height: 100px;
58
border-radius: 50%;
font-family: monospace;
background-color: red;
font-size: 20px;
</style>
<body>
<div class="chat-container">
<h1>தகவல் செயலி</h1>
<div>
</div>
<div>
</div>
</div>
<script>
function sendMessage() {
59
var userInput = document.getElementById("user-input").value;
displayUserMessage(userInput);
displayBotReplies(botReplies);
document.getElementById("user-input").value = "";
function startListening() {
recognition.lang = 'en-IN';
recognition.onresult = function(event) {
displayUserMessage(userInput);
displayBotReplies(botReplies);
};
recognition.start();
function displayUserMessage(message) {
60
messageElement.textContent = message;
messageElement.classList.add("message", "user");
chatBox.appendChild(messageElement);
function displayBotReplies(botReplies) {
botReplies.forEach(function(reply, index) {
if (index == 1) {
} else {
displayBotReply(reply);
});
function displayBotReply(reply) {
messageElement.textContent = reply;
messageElement.classList.add("message", "bot");
chatBox.appendChild(messageElement);
speakText(reply);
61
}
function generateBotReply(userInput) {
if (userInput.toLowerCase().includes("marriage")) {
botReplies.push(
function generateBotReply(userInput) {
if (userInput.toLowerCase().includes("marriage")) {
botReplies.push(
);
} else if (userInput.toLowerCase().includes("education")) {
62
botReplies.push(
);
63
} else if (userInput.toLowerCase().includes("medical") ||
userInput.toLowerCase().includes("health")) {
botReplies.push(
"Free Distribution of Milch Cows and Goats Scheme: Provides milch cows and
goats to economically disadvantaged families to improve their livelihoods and
nutrition.",
"Amma Free Wi-Fi Scheme: Provides free Wi-Fi access in public places,
including healthcare facilities, to facilitate internet connectivity for the public."
);
64
} else if (userInput.toLowerCase().includes("general") ||
userInput.toLowerCase().includes("welfare")) {
botReplies.push(
"Indira Awaas Yojana (IAY): Provides financial assistance for the construction
of houses for rural poor.",
"Tamil Nadu Free Laptop Scheme: Provides free laptops to eligible students to
enhance their learning experience.",
65
"Amma Marriage Halls Scheme: Offers marriage halls at subsidized rates for
economically disadvantaged families."
);
} else if (userInput.toLowerCase().includes("agriculture") ||
userInput.toLowerCase().includes("rural development")) {
botReplies.push(
);
66
} else if (userInput.toLowerCase().includes("women empowerment") ||
userInput.toLowerCase().includes("social welfare")) {
botReplies.push(
);
} else if (userInput.toLowerCase().includes("infrastructure") ||
userInput.toLowerCase().includes("urban development")) {
botReplies.push(
67
"Tamil Nadu Housing Board Schemes: Various housing schemes aimed at
providing affordable housing to eligible beneficiaries.",
);
elseif(userInput.toLowerCase().includes("environment") ||
userInput.toLowerCase().includes("renewable energy")) {
botReplies.push(
"Amma Free Wi-Fi Scheme: Provides free Wi-Fi access in public places,
promoting internet connectivity and digital inclusion."
);
68
}elseif(userInput.toLowerCase().includes("differently-abled") ||
userInput.toLowerCase().includes("disabilities")) {
botReplies.push(
);
elseif(userInput.toLowerCase().includes("hello") ||
userInput.toLowerCase().includes("hello")) {
botReplies.push(
69
);}
else if(userInput.toLowerCase().includes("hi") ||
userInput.toLowerCase().includes("hi")) {
botReplies.push(
);}
botReplies.push(
);
else {
return botReplies;
function speakText(text) {
msg.lang = 'en-IN';
window.speechSynthesis.speak(msg);
70
}
</script>
</body>
</html>
LOGIN PAGE
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login page</title>
</head>
<body>
<style>
*{
margin: 0;
padding: 0;
body {
background-image: url("logo/bg.jpg");
71
background-size: cover;
background-repeat: no-repeat;
#form {
margin-top: 150px;
margin-left: 35%;
box-sizing: border-box;
width: 30%;
height: 25rem;
border-radius: 5px;
.email {
width: 200px;
height: 20px;
border: none;
margin-top: 15px;
border-radius: 3px;
label {
72
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: medium;
.password {
width: 200px;
height: 20px;
border: none;
margin-top: 15px;
border-radius: 3px;
margin-left: 7px;
button {
padding: 10px;
width: 90px;
border: none;
border-radius: 5px;
margin-left: 205px;
margin-top: 30px;
h3 {
color: aliceblue;
margin-top: 5px;
73
}
i{
margin-top: 20px;
a{
color: red;
</style>
<center>
<label for="email">Email</label>
<br>
<label for="password">Password</label>
<br><br>
</center>
<button type="submit">Login</button>
</form>
</body>
74
</html>
SIGNUP.HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sign up</title>
</head>
<body>
<style>
*{
margin: 0;
padding: 0;
75
body{
background-image: url("logo/bg.jpg");
background-size:cover;
background-repeat: no-repeat;
#form{
margin-top: 100px;
margin-left: 35%;
box-sizing: border-box;
width: 30%;
height: 30rem;
border-radius: 5px;
width: 200px;
height: 20px;
border: none;
margin-top: 15px;
border-radius: 3px;
76
.email {
margin-left: 40px;
label{
font-size: medium;
margin-left: -10px;
button{
padding: 10px;
width: 90px;
border: none;
border-radius: 5px;
margin-left: 205px;
margin-top: 10px;
h3{
color: aliceblue;
margin-top: 5px;
i{
77
color: rgb(53, 188, 188);
margin-top: 20px;
</style>
<center><h3>Sign up</h3></center>
<center><label >Password</label>
<script>
function auth() {
78
if (password !== cpassword) {
} else {
</script>
</Form>
</body>
</html>
INDEX.JS
app.use(express.static(publicDirectoryPath));
app.use(express.json());
79
app.use(express.urlencoded({ extended: false }));
// Routes
res.sendFile(path.join(publicDirectoryPath, 'login.html'));
});
res.sendFile(path.join(publicDirectoryPath, 'signup.html'));
});
try {
80
fname,
lname,
email,
});
await newUser.save();
res.sendFile(path.join(publicDirectoryPath, 'chat.html'));
} catch (error) {
res.status(400).send(error.message);
});
try {
if (!user) {
if (!passwordMatch) {
81
}
res.sendFile(path.join(publicDirectoryPath, 'chat.html'));
} catch (error) {
res.status(400).send(error.message);
});
app.listen(PORT, () => {
});
MONGODB.JS
mongoose.connect("mongodb+srv://
vedhagiri602:[email protected]/?
retryWrites=true&w=majority&appName=Cluster0")
.then(() => {
console.log("MongoDB connected");
})
82
.catch((error) => {
});
fname: {
type: String
},
83
CHAPTER 8
SCREENSHOT
LOGIN PAGE
84
SIGN-UP PAGE
85
HOME PAGE
86
DATA RETRIEVAL
87
MONGODB
SPEECH RECONITION
88
CHAPTER 9
CONCLUSION
89
CHAPTER 10
FUTURE ENHANCEMENT
One future enhancement for enabling accessible governance could involve the
development of a chatbot specifically designed for blind individuals to navigate
government schemes effectively. This chatbot would utilize advanced natural
language processing capabilities and voice interfaces to provide seamless
interaction for users with visual impairments. In the pursuit of fostering
inclusive governance, there's a pressing need to address accessibility challenges
faced by visually impaired individuals. One innovative solution on the horizon
involves the development of a chatbot tailored specifically for blind individuals
to navigate government schemes and services seamlessly. This chatbot would
serve as a virtual assistant equipped with advanced natural language processing
capabilities, enabling users to interact with it using speech or text commands. Its
primary function would be to provide comprehensive information and guidance
regarding various government schemes, policies, and services, ensuring that
blind individuals have equitable access to essential resources and support.
Voice-Based Interaction:
The chatbot would primarily operate through voice commands and responses,
allowing blind individuals to interact with it easily using speech.
Text-to-Speech and Speech-to-Text Conversion:
It would incorporate robust text-to-speech and speech-to-text conversion
technologies to ensure smooth communication between the user and the system.
Accessibility Standards Compliance:
The chatbot would adhere to accessibility standards such as WCAG (Web
Content Accessibility Guidelines) to ensure that it is usable by individuals with
90
Personalized Assistance:
It would offer personalized assistance by understanding the specific needs and
preferences of each user, guiding them through the available government
schemes and providing relevant information tailored to their requirements.
Multi-Lingual Support:
To cater to diverse populations, the chatbot could support multiple languages,
enabling users to interact with it in their preferred language.
Integration with Government Databases:
The chatbot would be integrated with relevant government databases and
repositories of information, ensuring that users receive accurate and up-to-date
information about various schemes, eligibility criteria, application procedures,
etc.
Accessibility Feedback Mechanism:
There would be mechanisms in place for users to provide feedback on the
accessibility and usability of the chatbot, allowing for continuous improvement
and refinement of the system.
By implementing such a chatbot, governments can significantly enhance the
accessibility of their services for blind individuals, empowering them to access
essential government schemes and services independently and efficiently. This
not only promotes inclusivity but also ensures that all citizens can fully
participate in governance and benefit from public initiatives.
91
CHAPTER 11
REFERENCES
92
9. Kim, C., & Lee, M. (2020). Clustered Indexing Strategies in Database
Systems. Journal of Information Science and Engineering, 36(4), 789-
804. [DOI: 10.6688/JISE.202008_36(4).0001]
10.Knill, O., Trefethen, L. N., & Renaut, R. A. (2000). Sofia: An interactive
symbolic-numeric environment for mathematics. ACM SIGSAM
Bulletin, 34(3), 4-9.
11.Lee, J., & Brown, K. (2022). "Ensuring Consistency Across App and
Web Platforms." International Journal of Human-Computer
12.Liu, C., Chiang, J., & Huang, R. (2020). A comprehensive survey on
chatbot: past, present, and future. Expert Systems with Applications, 97,
405-422. [DOI: 10.1016/j.eswa.2018.11.032]
13.Miller, E., & Clark, L. (2023). "Cross-Platform Web Interface Design
Principles." WebTech Magazine, 18(4), 56-62. DOI:
10.5678/wtm.2023.18.4.56
14.Nirala, K. K., Singh, N., & Purani, V. S. (2022). A survey on providing
customer and public administration based services using AI: chatbot.
Multimedia Tools and Applications, 81(16), 22215–22246.
15.Rai, A., Kumar, A., & Rana, J. (2021). Chatbot: A comprehensive survey
on recent advancements, challenges, and applications. Engineering
Science and Technology, an International Journal, 24(4), 1025-1041.
[DOI: 10.1016/j.jestch.2020.12.007]
16.Schumaker, R. P., Ginsburg, M., Chen, H., & Liu, Y. (2006). An
evaluation of the chat and knowledge delivery components of a low-level
dialog system: The AZ-ALICE experiment. Decision Support Systems,
42(2), 2236-2246.
17.Turing, A. M. (1950). Computing Machinery and Intelligence. Mind,
59(236), 433-460. [DOI: 10.1093/mind/LIX.236.433]
93
18.Williams, J. D., & Young, R. M. (2007). Partially observable Markov
decision processes for spoken dialog systems. Computer Speech &
Language, (2), 393-422. [DOI: 10.1016/j.csl.2006.07.002]
94