This project combines machine learning and FastAPI to develop a powerful and scalable application for predictive analytics and real-time data processing."
The sepsis prediction project revolves around a machine learning model designed to accurately predict sepsis in intensive care unit (ICU) patients. The model has undergone rigorous training and evaluation to ensure its effectiveness in identifying patients at risk of sepsis.
The project provides a comprehensive solution, including a well-documented FastAPI hosted on a platform like the Hugging Face Model Hub and Heroku. This API allows seamless integration of the sepsis prediction model into existing healthcare systems, providing healthcare professionals with valuable insights to improve patient care.
To simplify deployment and usage, the project includes a Dockerfile that streamlines the setup process and ensures the necessary dependencies are installed. This enables easy deployment of the sepsis prediction model in various environments, both local and cloud-based.
Detailed documentation and practical examples are provided to guide users in effectively utilizing the sepsis prediction model. The documentation covers installation instructions, API usage guidelines, and highlights the potential applications of the model in real-world healthcare scenarios, empowering healthcare providers to make informed decisions and enhance patient outcomes.
Column Name | Attribute/Target | Description |
---|---|---|
ID | N/A | Unique number to represent patient ID |
PRG | Attribute1 | Plasma glucose |
PL | Attribute 2 | Blood Work Result-1 (mu U/ml) |
PR | Attribute 3 | Blood Pressure (mm Hg) |
SK | Attribute 4 | Blood Work Result-2 (mm) |
TS | Attribute 5 | Blood Work Result-3 (mu U/ml) |
M11 | Attribute 6 | Body mass index (weight in kg/(height in m)^2) |
BD2 | Attribute 7 | Blood Work Result-4 (mu U/ml) |
Age | Attribute 8 | Patients age (years) |
Insurance | N/A | If a patient holds a valid insurance card |
Sepssis | Target | Positive: if a patient in ICU will develop sepsis, and Negative: otherwise |
API | Deployed links |
---|---|
FastApi | Sepsis Prediction API-huggingface |
FastApi | Sepsis Prediction API-heroku |
App | Deployed links |
---|---|
Sepsis Prediction App | Deployed App with huggingface |
Technology | Version |
---|---|
Python | 3.9 |
FastAPI | 0.95.2 |
Uvicorn | 0.22.0 |
Scikit-learn | 0.24.1 |
Pandas | 1.2.4 |
Jinja2 | 3.1.2 |
Clone the repository to your local machine:
git clone https://github.com/Bright136/Embedding-a-Machine-Learning-Model-into-a-Web-Application.git
Navigate to the project directory:
cd Embedding-a-Machine-Learning-Model-into-a-Web-Application
Create a new virtual environment and activate the virtual:
Windows:
python -m venv venv; venv\Scripts\activate; python -m pip install -q --upgrade pip; python -m pip install -qr requirements.txt
Linux & MacOs:
python3 -m venv venv; source venv/bin/activate; python -m pip install -q --upgrade pip; python -m pip install -qr requirements.txt
To run any the notebooks:
To execute the API, follow these steps: After all requirement have been install
At the root of your repository in your terminal
root :: Embedding-a-Machine-Learning-Model-into-a-Web-Application> ...
run the command:
uvicorn src.app.app:app --reload
OR
python src/app/app.py
Open your browser and go to http://127.0.0.1:8000/docs to access the API documentation
To execute the App, follow these steps: After all requirement have been install
At the root of your repository in your terminal
root :: Embedding-a-Machine-Learning-Model-into-a-Web-Application> ...
run the command:
streamlit src/streamlit_app/main.py
Open your browser and go to http://localhost:8501 or http://172.20.10.12:8501 to access the App.
To test the various endpoints of the API using the provided documentation, follow these steps:
Start by accessing the API documentation, which provides detailed information about the available endpoints and their functionalities.
Locate the section that describes the input fields and parameters required for each endpoint. It will specify the expected data format, such as JSON or form data, and the necessary input fields.
Enter the required input data into the corresponding input fields or parameters as specified in the documentation.
Send the request by clicking the "Execute" button or using the appropriate method in your chosen tool. The API will process the request and generate the output based on the provided inputs.
Retrieve the response from the API, which will contain the generated output. This output may include predictions, probability scores, or any other relevant information related to sepsis prediction.
Repeat the process to test different endpoints or vary the input data to explore the capabilities of the API. Make sure to follow the documentation's guidelines for each endpoint to ensure accurate results.
To contribute to this project, follow these guidelines:
This app makes calls to our API endpoint /predict.
Name | GitHub | Hugging Face | ||
---|---|---|---|---|
Bright Eshun | @bright_eshun_ | @brighteshun | @bright136 | @bright1 |