This project is a simple web-based healthcare chatbot application that predicts the risk of diabetes based on user input. The application uses a machine learning model to provide predictions.
- Interactive web form to input health-related parameters.
- Predicts diabetes risk based on the input data.
- Utilizes Flask for the backend and a machine learning model for predictions.
- Scalable and customizable for different healthcare use cases.
- Python 3.9 or higher
- Flask
- Scikit-learn
- Joblib
- Numpy
- Pandas
-
Clone the repository:
git clone https://github.com/your-username/HealthCareChatbot.git cd HealthCareChatbot
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Train the model and save it:
python train_model.py
-
Run the Flask application:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5001
to access the web application.
app.py
: The Flask application file that handles API requests and serves the web application.train_model.py
: Script to train the machine learning model and save it as amodel.pkl
file.index.html
: The front-end HTML file that provides the user interface.requirements.txt
: List of required Python packages.
- The user inputs their health parameters (age, BMI, blood pressure, cholesterol levels, etc.) into the web form.
- The data is sent to the Flask backend via a POST request.
- The backend processes the input data, scales it using the pre-trained scaler, and makes a prediction using the pre-trained machine learning model.
- The prediction (diabetes risk level) is returned to the user and displayed on the web interface.
Feel free to contribute to this project by submitting issues or pull requests.
This project is licensed under the MIT License. See the LICENSE
file for more details.