This project implements a chatbot that predicts diseases and recommends treatments using machine learning algorithms such as Naive Bayes and Decision Tree. Built with Python 3.6, Flask, and ChatterBot, the chatbot analyzes user-reported symptoms to provide accurate health insights and treatment recommendations. The system utilizes a preprocessed medical dataset for training and employs natural language processing to interpret user inputs. The research paper detailing this project was published in High Technology Letters, Volume 27, Issue 6, 2021.
A web implementation of ChatterBot using Flask.
- Python 3.6
- Flask==0.11
- ChatterBot==0.8.4
- SQLAlchemy==1.1.11
- Disease prediction based on user symptoms
- Treatment recommendations
- Interactive web-based interface
- Python 3.6
- pip (Python package installer)
1. Install dependencies: Open command prompt and locate folder. run 'pip install -r requirements.txt'
4. Acess the Demo: Demo will be live at http://localhost:5000/
- train.py: Script to train the chatbot using predefined datasets.
- run.py: Script to start the Flask web server.
- main.py, main_1.py: Additional scripts for various functionalities.
- chatbot_database/: Directory containing training data files.
- db.sqlite3: SQLite database file.
- requirements.txt: List of Python packages required to run the application.
- README.md: This README file.
- Human-Disease-Prediction-using-Machine-Learning-Algorithms-master.zip: Project archive file.
- Training.csv, Testing.csv: Datasets for training and testing the model.
Once the application is running, you can interact with the chatbot to get disease predictions and treatment recommendations. Simply input your symptoms, and the chatbot will analyze them to provide a potential diagnosis and suggested treatments.
This source is free to use, but ChatterBot does have a license which still applies and can be found on the LICENSE page.
- The ChatterBot library for providing the chatbot framework.
- The Flask framework for enabling web application development.