
Self-Reliant Medical Chatbot Using Machine Learning for Smart Intent Classification
Self-Reliant Medical Chatbot Using Machine Learning for Smart Intent Classification
IEEE BASE PAPER TITLE:
A Self-Diagnosis Medical Chatbot using in Flask
IEEE BASE PAPER ABSTRACT:
Electronic devices that provide instant assistance for common health issues have been developed in response to the increased demand for easily available healthcare solutions. This Flask framework, an efficient web development platform, was used to create the medical chatbot shown in this study. This chatbot uses ChatterBot, a powered by AI conversational engine, to communicate with users in a manner similar to that of a human and is intended to give them specialized healthcare information. The backend database administration system, SQLAlchemy, is used to store conversations with users, symptoms records, and training information for later use. This guarantees that the chatbot will eventually provide precise, tailored responses. The Medical Chatbot’s main functions include identifying symptoms, recommending over-the-counter medications, and giving guidance on when to seek medical help. The system’s ability to log interactions and store trained data within the database enables it to continually refine its responses, improving accuracy and relevance. The chatbot operates 24/7, providing users with continuous access to health-related guidance without the need for immediate human intervention. By utilizing Flask and SQLAlchemy, the system ensures scalability, security, and seamless integration of data storage. This paper details the architecture and design of the Medical Chatbot, its use of ChatterBot and SQLAlchemy for creating an intelligent and reliable platform, and its potential role in improving healthcare accessibility. Challenges encountered during development, such as ensuring data security and user privacy, are also discussed. Future improvements are also investigated, such as extending the system’s capabilities and using more sophisticated machine learning algorithms.
PROJECT OUTPUT VIDEO:
ALGORITHM / MODEL USED:
Recurrent Neural Network (RNN)
OUR PROPOSED ABSTRACT:
The rapid advancements in Artificial Intelligence (AI) and Natural Language Processing (NLP) have enabled the development of intelligent systems that can provide reliable medical assistance to users through conversational interfaces. This project, titled “Self-Reliant Medical Chatbot Using Machine Learning for Smart Intent Classification” presents a web-based application that assists users in identifying possible medical conditions and recommending precautionary measures based on their symptoms.
The chatbot is developed using Python as the core programming language, with Flask serving as the lightweight web framework for backend integration. The front end is implemented using HTML, CSS, and JavaScript, ensuring an interactive and user-friendly interface accessible through a web browser.
The heart of the system lies in its machine learning-based intent classification model, which leverages a Recurrent Neural Network (RNN) to process textual inputs. The RNN model is trained on a structured intents in JSON file format that contains medical symptoms, corresponding disease tags, and precautionary responses. By employing the RNN’s capability to handle sequential data, the chatbot can effectively recognize patterns in user inputs, classify them into appropriate medical categories, and generate contextually accurate responses. The model achieves efficient training and prediction by applying bag-of-words and tokenization techniques for text preprocessing, followed by feeding numerical feature vectors into the RNN classifier.
The application also integrates a dynamic knowledge update module through its admin interface. This feature enables administrators to add new diseases, symptoms, and hospital locations directly via the dashboard. Upon retraining, the chatbot immediately adapts to the updated dataset without requiring system downtime, ensuring that the knowledge base remains scalable and up to date. The system further supports hospital recommendation functionality, where nearby medical centers stored in a knowledge base of JSON file format can be suggested to users based on queries.
Through this design, the proposed system demonstrates the potential of combining deep learning, NLP, and web technologies to create a self-reliant, scalable, and interactive medical assistant. While not a substitute for professional diagnosis, this chatbot offers a first level of health guidance, promotes user awareness of symptoms, and can be extended with advanced datasets for broader coverage.
SYSTEM REQUIREMENTS:
HARDWARE REQUIREMENTS:
- System : Pentium i3 Processor.
- Hard Disk : 20 GB.
- Monitor : 15’’ LED.
- Input Devices : Keyboard, Mouse.
- Ram : 8 GB.
SOFTWARE REQUIREMENTS:
- Operating System : Windows 10 / 11.
- Coding Language : Python 3.12.0.
- Web Framework : Flask.
- Frontend : HTML, CSS, JavaScript.
REFERENCE:
Sivagar M R; Pra bavath i R; P Subha; Gokulnath A; Jayanesh S; Vignesh R, “A Self-Diagnosis Medical Chatbot using in Flask”, IEEE Conference, IEEE Xplore, 2025
👉CLICK HERE TO BUY THIS PROJECT “Self-Reliant Medical Chatbot Using Machine Learning for Smart Intent Classification” SOURCE CODE👈
Frequently Asked Questions (FAQs) & Answers:
The purpose of this project is to develop an AI-powered medical chatbot that helps users identify possible health conditions based on their symptoms and provides precautionary guidance. The system also suggests hospital information and allows dynamic updates through an admin panel.
• Programming Language: Python • Web Framework: Flask • Frontend: HTML, CSS, JavaScript, Tailwind CSS • Machine Learning Model: Recurrent Neural Network (RNN) • Data Storage: JSON files (intents.json for diseases, medical_centers.json for hospitals)
When a user enters symptoms into the chatbox: 1. The input is sent to the Flask backend. 2. The text undergoes preprocessing (tokenization, stemming, bag-of-words). 3. The processed input is classified by the RNN model into a medical intent (disease). 4. The corresponding response and precaution are retrieved from the knowledge base. 5. The chatbot displays the result to the user in real time.
The RNN model is responsible for intent classification. It analyzes user-entered symptoms as sequential data and predicts the most relevant disease tag. Unlike rule-based systems, the RNN captures contextual patterns in language, making predictions more accurate.
The admin panel provides options to add new diseases, symptoms, responses, and hospital information. Once added, the system can retrain the RNN model so that the chatbot adapts to the new data without requiring manual backend modifications.
• Disease Data (intents.json): Contains tags (disease names), symptom patterns, and precautionary responses. • Hospital Data (medical_centers.json): Contains hospital tags, latitude/longitude coordinates, and full addresses.
No. The chatbot provides preliminary guidance only. It suggests possible conditions and precautions but does not replace professional medical advice. For serious or persistent symptoms, users are encouraged to consult healthcare professionals.
Yes. The chatbot retrieves hospital information from the medical_centers.json dataset and provides users with names, addresses, and locations of available medical centers.
When new diseases or hospitals are added, the admin can trigger retraining from the panel. The RNN model is retrained on the updated dataset (intents.json), and the new model is saved (tdata_rnn.pth). This allows the chatbot to immediately adapt to new knowledge.
Yes. The modular architecture allows: • Expansion of the dataset with new diseases and hospitals. • Integration with advanced deep learning models like LSTMs or Transformers. • Future inclusion of features like multilingual support or real-time geolocation for hospital recommendations. 1. What is the purpose of this project?
2. Which technologies are used to develop the chatbot?
3. How does the chatbot process user input?
4. What is the role of the RNN model in this system?
5. How can new diseases or hospitals be added to the system?
6. What type of data is used in the knowledge base?
7. Does the chatbot provide a confirmed medical diagnosis?
8. Can the chatbot recommend hospitals?
9. How does the retraining feature work?
10. Is the system scalable for future improvements?