ikoghoemmanuell
commited on
Commit
•
c685bff
1
Parent(s):
f6ec6d0
Update app/main.py
Browse files- app/main.py +22 -1
app/main.py
CHANGED
@@ -64,7 +64,28 @@ class Patients(BaseModel):
|
|
64 |
# Root Endpoint
|
65 |
@app.get("/")
|
66 |
def root():
|
67 |
-
return {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
# Prediction endpoint
|
70 |
@app.post("/predict")
|
|
|
64 |
# Root Endpoint
|
65 |
@app.get("/")
|
66 |
def root():
|
67 |
+
return {
|
68 |
+
"message": "Welcome to the Sepsis Prediction API!",
|
69 |
+
"description": "This API provides endpoints for predicting sepsis based on patient data.",
|
70 |
+
"endpoints": [
|
71 |
+
{
|
72 |
+
"url": "/",
|
73 |
+
"method": "GET",
|
74 |
+
"description": "Root endpoint providing information about the API."
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"url": "/predict",
|
78 |
+
"method": "POST",
|
79 |
+
"description": "Endpoint to make a single patient sepsis prediction."
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"url": "/predict_multiple",
|
83 |
+
"method": "POST",
|
84 |
+
"description": "Endpoint to make sepsis predictions for multiple patients."
|
85 |
+
}
|
86 |
+
]
|
87 |
+
}
|
88 |
+
|
89 |
|
90 |
# Prediction endpoint
|
91 |
@app.post("/predict")
|