Spaces:
Sleeping
Sleeping
Jacob Jaroya
commited on
Commit
·
a7ab506
1
Parent(s):
74c9228
readme
Browse files
README.md
CHANGED
@@ -1,11 +1,75 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Sepsis Prediction API
|
2 |
+
|
3 |
+
This repository contains a FastAPI-based web application that provides an API for predicting sepsis disease in patients based on input features. The API leverages a machine learning model trained on relevant data. The API allows users to submit patient data and receive a prediction along with confidence scores.
|
4 |
+
|
5 |
+
## Getting Started
|
6 |
+
|
7 |
+
To get started with the Sepsis Prediction API, follow the steps below:
|
8 |
+
|
9 |
+
### Prerequisites
|
10 |
+
|
11 |
+
- Docker: Make sure you have Docker installed on your machine.
|
12 |
+
|
13 |
+
### Installation
|
14 |
+
|
15 |
+
1. Clone this repository to your local machine:
|
16 |
+
|
17 |
+
```bash
|
18 |
+
git clone https:https://huggingface.co/UholoDala
|
19 |
+
|
20 |
+
2. Navigate to the repository directory:
|
21 |
+
cd sepsis_classic
|
22 |
+
|
23 |
+
3. Build the Docker image:
|
24 |
+
docker build -t sepsis-prediction-api .
|
25 |
+
|
26 |
+
4. Run the Docker container:
|
27 |
+
docker run -d -p 7860:7860 sepsis-prediction-api
|
28 |
+
|
29 |
+
The API will now be accessible at http://localhost:7860.
|
30 |
+
|
31 |
+
## API Endpoints
|
32 |
+
|
33 |
+
### Root Endpoint
|
34 |
+
- URL: http://localhost:7860/
|
35 |
+
- Method: GET
|
36 |
+
- Description: Provides basic information about the Sepsis Prediction API.
|
37 |
+
|
38 |
+
### Sepsis Classification Endpoint
|
39 |
+
- URL: http://localhost:7860/spaces/UholoDala/sepsis_classic/classify
|
40 |
+
- Method: POST
|
41 |
+
- Description: Accepts patient data and performs sepsis classification. Provides the prediction and confidence scores.
|
42 |
+
|
43 |
+
## Usage
|
44 |
+
You can interact with the API using tools like curl, web browsers, or API testing tools like Postman.
|
45 |
+
|
46 |
+
### Example curl command to perform sepsis classification:
|
47 |
+
curl -X POST -H "Content-Type: application/json" -d '{
|
48 |
+
"PlasmaGlucose": 120,
|
49 |
+
"BloodWorkResult_1": 4,
|
50 |
+
"BloodPressure": 80,
|
51 |
+
"BloodWorkResult_2": 7,
|
52 |
+
"BloodWorkResult_3": 9,
|
53 |
+
"BodyMassIndex": 25.5,
|
54 |
+
"BloodWorkResult_4": 12.5,
|
55 |
+
"Age": 50
|
56 |
+
}' http://localhost:7860/spaces/UholoDala/sepsis_classic/classify
|
57 |
+
|
58 |
+
## Dependencies
|
59 |
+
- pytest
|
60 |
+
- scikit-learn
|
61 |
+
- fastapi[all]
|
62 |
+
- pydantic
|
63 |
+
- uvicorn
|
64 |
+
- pypi-json
|
65 |
+
- requests
|
66 |
+
- pandas
|
67 |
+
- tabulate
|
68 |
+
|
69 |
+
This project is licensed under the MIT License.
|
70 |
+
|
71 |
+
## Acknowledgments
|
72 |
+
This project was developed as part of the Azubi Africa Data Analysis LP6 Project. We would like to thank all contributors for their valuable insights and efforts.
|
73 |
+
|
74 |
+
For more information, feel free to contact me at [email protected] or [email protected].
|
75 |
+
|