Uhmmm
Uhmmm
PROJECT REPORT
Submitted to
Kongunadu Arts and Science College (Autonomous)
Affiliated to Bharathiar University in partial fulfillment of the requirements for the
award of the degree of
Bharathiar University in partial fulfillment of the requirement for the Degree of Bachelor of Science
in Computer Science with Data Analytics, is a record of original Project work done by me during the
Kongunadu Arts and Science College (Autonomous), Coimbatore. The project has not formed the
basis for the award of Degree / Diploma /Associate ship/Fellowship or similar title to any candidate
of any University.
------------------------------------
Signature of the Candidate
(HARIDHBHARAN S)
Place:
Date:
CERTIFICATE
This is to certify that the Project work entitled “AI-DRIVENNUMBER PLATE
Bharathiar University in partial fulfillment of the requirement for the Degree of Bachelor of
Computer Science with Data Analytics is a record of original Project work done by
Computer Science with Data Analytics at Kongunadu Arts and Science College (Autonomous),
Coimbatore, under my supervision and the project has not formed the basis for the award any
Degree/Diploma /Associate ship /Fellowship or similar title to any candidate of any University.
------------------------------
Place: Signature of the Guide
Date: Mrs. P. INDUMATHI., MCA., M.phil., B.Ed
Countersigned
Submitted for Viva – Voce Examination held on 18.03.2025 at Kongunadu Arts and Science
College (Autonomous), Coimbatore – 641 029.
I am deeply grateful to the Almighty, whose blessings and guidance have been my strength
throughout this project, shaping me into the person I am today.
I extend my sincere gratitude to our esteemed Secretary and Director, Dr. C.A. VASUKI, for
her unwavering support and for providing all the necessary resources during my academic journey.
M.phil.,B.Ed., Assistant Professor, Department of Computer Science with Data Analytics, for her
invaluable guidance, motivation, and unwavering support throughout this journey.
The system employs advanced machine learning algorithms, including decision trees, random
forests, SVMs, logistic regression, and deep neural networks, to analyze patterns in patient data and
predict suitable medications. Models are trained and optimized using evaluation metrics such as
accuracy, precision, recall, and F1-score to ensure high reliability and robustness. By continuously
incorporating new medical research, updated treatment guidelines, and real-world patient outcomes,
the system evolves to improve recommendations and adapts to advancements in the medical field.
The AI-powered system follows a structured workflow involving data collection and
processing, feature selection, model training and validation, real-time predictions, user interaction,
healthcare system integration, and continuous learning. Real-time recommendations are displayed
through an interactive dashboard, ensuring seamless usability for healthcare professionals. The
system continuously updates its predictions based on new medical findings, user feedback, and
evolving clinical standards, making it a dynamic and evolving healthcare tool.
TABLE OF CONTENTS
CHAPTER
PARTICULARS PAGE NO.
NO.
INTRODUCTION 1
1.1 About the Organisation 1
1 1.2 Overview of The Project
1.3 Problem Statement
1.4 Objectives
SYSTEM ANALYSIS
2.1 Existing System
2
2.2 Proposed System
2.3 Advantages
SYSTEM REQUIREMENTS
3
3.1 Hardware & Software Requirements
SYSTEM DESIGN
4 4.1 System Architecture
4.2 Workflow of the System
SYSTEM IMPLEMENTATION
5 5.1 Integration with Machine Learning Model
5.2 Frontend & Backend Development
TESTING AND DEPLOYMENT
6.1 Functional Testing
6
6.2 Performance Evaluation
6.3 Deployment Process
7 RESULTS AND DISCUSSION
8 FUTURE ENHANCEMENT
9 CONCLUSION
10 APPENDIX
1. INTRODUCTION
1.1ABOUT THE ORGANISATION
Cryprus Infotech Pvt.Ltd offers IT solutions and custom software development services on
cutting-edge technology platforms like Business Intelligence, Artificial Intelligence, Machine
Learning, Blockchain, Internet of Things and much more. With robust technical expertise and rich
experience in custom software development, we offer quality, on-time and cost-effective solutions.
This system aims to bridge the gap between traditional prescription methods and AI-driven
decision-making by automating medication selection and improving accuracy. Healthcare
professionals can input patient details, and the system will generate evidence-based, data-driven
recommendations while considering factors such as drug interactions and contraindications. The
project’s ultimate goal is to enhance patient safety, optimize prescription accuracy, and minimize
human errors in medical recommendations.
Misdiagnosis or incorrect prescriptions can lead to adverse drug reactions, prolonged treatment
durations, increased healthcare costs, and patient dissatisfaction. There is also a growing demand for
data-driven, AI-powered solutions that can analyze large-scale patient data in real-time, providing
accurate, personalized, and evidence-based medication recommendations.
The proposed Medicine Recommendation System addresses these challenges by utilizing machine
learning algorithms to predict the most suitable medication for a patient based on their medical
history, symptoms, and drug compatibility. The system ensures that prescriptions are not only
accurate but also tailored to each individual’s needs, significantly reducing the risks of incorrect
treatments.\
1.4 OBJECTIVES
Ensure data security and compliance with healthcare standards such as HIPAA and GDPR for
patient confidentiality and safe handling of sensitive medical data.
This project aims to provide a robust, scalable, and efficient AI-driven solution that transforms
medication recommendations, ensuring improved healthcare outcomes and safer prescription
practices.
2. SYSTEM ANALYSIS
2.1 EXISTING SYSTEM
The Medicine Recommendation System introduces an AI-driven approach that overcomes the
limitations of traditional methods. By leveraging machine learning models, real-time data analysis,
and an interactive web-based interface, the proposed system provides personalized medication
recommendations based on data-driven insights rather than just manual decision-making.
Key features of the proposed system include:
The proposed AI-based Medicine Recommendation System provides several benefits over
traditional methods:
Integration with Healthcare Systems: The system can be linked with EHRs and medical
databases, ensuring seamless data access.
Scalability & Adaptability: The system can continuously learn and improve as more patient
data becomes available, keeping up with medical advancements.
Hardware Requirements
To efficiently handle machine learning model execution, data processing, and web interface
operations, the system requires the following hardware specifications:
Processor: Intel Core i5/i7 or AMD Ryzen 5/7 (or higher) for smooth computation.
RAM: Minimum 8GB (Recommended: 16GB or more for handling large datasets and model
training).
Storage: At least 256GB SSD (Recommended: 512GB SSD or higher for faster read/write
speeds and data access).
GPU (Optional): NVIDIA GPU with CUDA support for deep learning model acceleration (if
required).
Software Requirements
The system's software stack consists of tools for machine learning model execution, web
development, and backend integration.
Operating System:
Python 3.8+ (Core programming language for model execution and backend development)
Flask (Web framework for handling API requests and serving the frontend)
Web Technologies:
Jinja (For dynamic web page rendering and integration with Flask)
Localhost Server (Flask Development Server) (For running the web application locally)
By meeting these hardware and software requirements, the Medicine Recommendation System
ensures smooth performance, reliable model execution, and an intuitive web interface for testing and
validation.
4. SYSTEM DESIGN
4.1 SYSTEM ARCHITECTURE
The web interface is built using HTML, CSS, JavaScript, Bootstrap, and Jinja to provide a
responsive and interactive user experience.
The backend is developed using Flask, which handles HTTP requests, processes user inputs,
and communicates with the machine learning model.
The Flask server acts as the bridge between the frontend and the ML model, ensuring
seamless data flow.
The core recommendation engine is built using Scikit-learn, TensorFlow, or PyTorch for
model execution.
The model takes input from the user, analyzes medical data, and provides personalized
medication recommendations.
Data preprocessing and transformation are handled using Pandas and NumPy to ensure high-
quality predictions.
Since the system runs on a local server, there is no external database integration. Instead, test
data and model files are stored in the project directory.
The Flask application loads the trained model from a serialized format (pickle or TensorFlow
model files) and processes requests dynamically.
The overall architecture is lightweight, scalable, and modular, ensuring smooth execution in a
local environment without the need for cloud-based storage or databases.
The Medicine Recommendation System follows a structured workflow to process user inputs
and generate medication recommendations effectively. The steps involved in the workflow are as
follows:
Input fields validate the entered symptoms to ensure correct data formatting.
The entered symptoms are pre-processed and transformed into a format compatible with the
machine learning model.
The processed input is passed to the machine learning model, which predicts the most
suitable medication based on the given symptoms.
The model utilizes pre-trained datasets and applies classification algorithms to generate
recommendations.
The system presents a list of suggested medications along with additional information (e.g.,
possible side effects, dosage recommendations).
The results are sent back to the Flask backend, which then passes them to the frontend for
display.
The user can view the recommended medications and alternative treatment options.
Step 6: Feedback and System Learning
Future enhancements may include refining the model by incorporating real-time learning
mechanisms to improve accuracy.
This workflow ensures seamless interaction between the frontend, backend, and machine
learning model, allowing for efficient, real-time medication recommendations without relying on an
external database or cloud services.
5. SYSTEM IMPLEMENTATION
5.1 INTEGRATION WITH MACHINE LEARNING MODEL
The Medicine Recommendation System integrates a machine learning model to provide real-
time medication recommendations based on user-input symptoms. The integration process involves
several key steps:
1. Training the Model: The model is trained using datasets containing patient symptoms,
medical history, and medication records. Techniques such as decision trees, random forests,
support vector machines (SVMs), and neural networks are used to enhance accuracy.
2. Saving the Trained Model: Once trained, the model is saved in a pickle (.pkl) format or
TensorFlow/Keras model format to be loaded dynamically.
3. Flask API for Model Communication: The trained model is integrated with Flask, allowing
the backend to send user inputs to the model and return predictions.
4. Processing User Input: When a user enters symptoms, the system preprocesses the input,
extracts features, and sends it to the machine learning model for analysis.
5. Returning Predictions: The model generates a list of recommended medications and sends
them back to the web interface for display.
Frontend Development
The frontend of the system is developed using HTML, CSS, JavaScript, Bootstrap, and Jinja,
ensuring a user-friendly experience. Key components include:
Backend Development
Handles HTTP Requests: Processes user input and communicates with the ML model.
Loads the Trained Model: Uses Python libraries to load the model dynamically for
predictions.
Manages Data Processing: Prepares input data before passing it to the machine learning
model.
By combining Flask, Jupyter Notebook, and modern web technologies, the system ensures
smooth and efficient processing of user queries, resulting in real-time medication recommendations.
6. TESTING AND DEPLOYMENT
6.1 FUNCTIONAL TESTING
Functional testing ensures that the Medicine Recommendation System operates as expected,
providing accurate medication suggestions based on user inputs. The testing process includes
verifying that user inputs are correctly processed, model predictions are generated accurately, and
results are displayed properly on the frontend.
Testing Methods:
Unit Testing: Each component, such as symptom input validation, Flask API response, and
model output, is tested individually.
Integration Testing: Ensures smooth communication between the frontend, backend, and
machine learning model to validate correct data flow.
User Acceptance Testing (UAT): Real-world test cases are simulated to verify that the
system meets the requirements and expectations of healthcare professionals.
Checking that the machine learning model returns relevant medication recommendations.
Verifying that the Flask backend processes and returns results efficiently.
Performance evaluation ensures that the system delivers fast, accurate, and scalable
medication recommendations. The system is assessed using various machine learning evaluation
metrics and system performance benchmarks.
Processing Time: Evaluates the response time of the system from user input to
recommendation display.
Response Time: Measures how quickly the system processes user requests and delivers
results.
Memory & CPU Usage: Assesses resource consumption for efficiency in execution.
Scalability Testing: Ensures the system can handle multiple simultaneous users without
performance degradation.
The Medicine Recommendation System is designed to run on a local Flask server, making
deployment simple and efficient. The deployment process involves the following steps:
Deployment Steps:
o Set up the machine learning model in a serialized format (e.g., .pkl file).
o Access the frontend through a local web browser using the Flask server.
This deployment process ensures that the system is fully functional on a local machine, enabling
efficient testing and validation without requiring external servers or databases. Future enhancements
may include deployment to cloud platforms for broader accessibility.
7. RESULT AND DISCUSSION
The Medicine Recommendation System was tested extensively to evaluate its accuracy,
efficiency, and reliability in generating medication recommendations based on user-input symptoms.
This section presents the key findings from system testing and discusses the impact of machine
learning integration on healthcare decision-making.
The system was tested using various datasets containing patient symptoms, medical history,
and known drug prescriptions. The evaluation metrics used to measure the model's performance
include:
The confusion matrices for each model confirmed that the predictions were highly accurate, with
minimal misclassifications.
Performance Metrics:
Precision & Recall: Precision values indicated that the model successfully identified correct
medications while minimizing false positives.
F1-Score: A balance between precision and recall was maintained, ensuring optimal
performance.
Processing Time: The system processed user inputs and generated medication suggestions
within 2-3 seconds, demonstrating efficiency.
7.2 PERFORMANCE OF THE WEB INTERFACE
The web-based testing interface, developed using Flask, HTML, CSS, JavaScript, and Jinja,
provided a seamless user experience. The following observations were recorded during usability
testing:
The system’s response time was optimal, delivering recommendations quickly without
noticeable lag.
The Flask backend successfully communicated with the machine learning model, ensuring
smooth data processing.
Reduction in human errors that could arise from misinterpretation of symptoms or incomplete
patient history.
Scalability and adaptability, allowing future integration with real-world medical databases
and additional AI improvements.
While the system performed well under controlled testing, certain challenges and limitations were
observed, such as:
Dependence on training data quality: The model’s accuracy depends on the completeness
and correctness of the dataset.
No real-time learning capability: The system does not update itself dynamically based on
user feedback.
Potential need for physician validation: Although the system provides recommendations, a
doctor’s final approval remains essential.
Overall, the Medicine Recommendation System successfully met its objectives by providing
reliable, data-driven medication recommendations with a user-friendly interface. Future
enhancements could include improving model accuracy, integrating real-world patient feedback, and
expanding the system’s learning capabilities.
8. FUTURE ENHANCEMENTS
To further improve the Medicine Recommendation System, various enhancements can be
implemented to optimize its accuracy, scalability, and usability.
1. Model Optimization:
Extracting more meaningful patient features, such as genetic markers and lifestyle factors, to
refine recommendations.
2. Scalability Improvements:
Utilizing parallel processing and lightweight models to enhance efficiency and reduce
response time.
Integrating APIs with electronic health records (EHRs) and hospital systems for real-time
data access.
Designing the system in a modular structure to allow future expansions without disrupting
existing functionality.
These enhancements will ensure that the system remains highly accurate, scalable, and adaptable,
allowing it to evolve with medical advancements and user needs.
9. CONCLUSION
The system’s adaptability allows for continuous improvements through real-time data updates,
user feedback, and evolving clinical guidelines. Future enhancements will focus on expanding
disease coverage, optimizing scalability, and incorporating multilingual support. As it evolves, the
system has the potential to significantly improve patient care, enhance prescription accuracy, and
support medical professionals in making more informed decisions, contributing to the advancement
of precision medicine.
10.APPENDIX
DATA SETS:
Diets Dataset:
Symptom Dataset:
Medication Dataset:
Description Dataset:
Precaution Dataset:
Workout Dataset:
SAMPLE CODE:
Main.py :
import numpy as np
import pandas as pd
import pickle
import os
sym_des = pd.read_csv("dataset/symtoms_df.csv")
precautions = pd.read_csv("dataset/precautions_df.csv")
workout = pd.read_csv("dataset/workout_df.csv")
description = pd.read_csv("dataset/description.csv")
medications = pd.read_csv('dataset/medications.csv')
diets = pd.read_csv("dataset/diets.csv")
svc = pickle.load(open('models/svc.pkl','rb'))
def helper(dis):
return desc,pre,med,die,wrkout
diseases_list = {15: 'Fungal infection', 4: 'Allergy', 16: 'GERD', 9: 'Chronic cholestasis', 14: 'Drug
Reaction', 33: 'Peptic ulcer diseae', 1: 'AIDS', 12: 'Diabetes ', 17: 'Gastroenteritis', 6: 'Bronchial
Asthma', 23: 'Hypertension ', 30: 'Migraine', 7: 'Cervical spondylosis', 32: 'Paralysis (brain
hemorrhage)', 28: 'Jaundice', 29: 'Malaria', 8: 'Chicken pox', 11: 'Dengue', 37: 'Typhoid', 40: 'hepatitis
A', 19: }
def get_predicted_value(patient_symptoms):
input_vector = np.zeros(len(symptoms_dict))
input_vector[symptoms_dict[item]] = 1
return diseases_list[svc.predict([input_vector])[0]]
@app.route("/")
def index():
return render_template("index.html")
def home():
if request.method == 'POST':
symptoms = request.form.get('symptoms')
Index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Health AI Diagnosis</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<style>
body {
color: #333;
.navbar-brand {
font-weight: bold;
display: flex;
align-items: center;
.logo {
height: 40px;
margin-right: 10px;
.container {
max-width: 600px;
background: white;
padding: 30px;
border-radius: 12px;
margin-top: 50px;
<body>
<div class="container-fluid">
</a>
</nav>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About Us</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<style>
body {
color: #333;
.navbar {
background: #007bff;
padding: 15px;
.navbar-brand {
font-weight: bold;
}
.container {
max-width: 800px;
padding: 20px;
border-radius: 10px;
.btn-custom:hover {
transform: scale(1.05);
</style>
</head>
<body>
<div class="container-fluid">
<span class="navbar-toggler-icon"></span>
</button>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
</ul>
</div>
</div>
</nav>
<h3>About Us</h3>
<p>Welcome to Medical Health Center, where health meets technology for a brighter, healthier
future.</p>
<h3>Our Vision</h3>
<p>We envision a world where access to healthcare information is not just a luxury but a
fundamental right. Our journey began with a simple yet powerful idea: to empower individuals with
the knowledge and tools they need to take control of their health.</p>
Contact.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<style>
body {
color: #333;
.navbar {
background: #007bff;
padding: 15px;
.container {
max-width: 700px;
background: rgba(255, 255, 255, 0.9);
</li>
<li class="nav-item">
</li>
</ul>
</div>
</div>
</nav>
<form>
<div class="mb-3">
</div>
<div class="mb-3">
</div>
<div class="mb-3">
</div>
</form>
<div class="contact-info">
<p><b>Email:</b> healthAI1234@gmail.com</p>
<p><b>Phone:</b> 0043-87612356</p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"></
script>
</body>
</html>
Data Accuracy:
models = {
'SVC': SVC(kernel='linear'),
'KNeighbors': KNeighborsClassifier(n_neighbors=5),
'MultinomialNB': MultinomialNB()
}
model.fit(X_train, y_train)
predictions = model.predict(X_test)
cm = confusion_matrix(y_test, predictions)