ikoghoemmanuell commited on
Commit
645687e
1 Parent(s): a917197

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +1 -48
app/main.py CHANGED
@@ -64,54 +64,7 @@ class Patients(BaseModel):
64
  # Root Endpoint
65
  @app.get("/")
66
  def root():
67
- return {
68
- "API": {
69
- "Description": "Welcome to the Sepsis Prediction API! This API provides endpoints for predicting sepsis based on patient data.",
70
- "Endpoints": {
71
- "GET /": {
72
- "Description": "Root endpoint providing information about the API."
73
- },
74
- "POST /predict": {
75
- "Description": "Endpoint to make a single patient sepsis prediction.",
76
- "Input": "JSON payload containing patient data.",
77
- "Example Payload": {
78
- "Blood_Work_R1": 123,
79
- "Blood_Pressure": 80,
80
- "Blood_Work_R3": 100,
81
- "BMI": 25.5,
82
- "Blood_Work_R4": 4.7,
83
- "Patient_age": 50
84
- },
85
- },
86
- "POST /predict_multiple": {
87
- "Description": "Endpoint to make sepsis predictions for multiple patients.",
88
- "Input": "JSON payload containing an array of patient objects.",
89
- "Example Payload": {
90
- "all_patients": [
91
- {
92
- "Blood_Work_R1": 123,
93
- "Blood_Pressure": 80,
94
- "Blood_Work_R3": 100,
95
- "BMI": 25.5,
96
- "Blood_Work_R4": 4.7,
97
- "Patient_age": 50
98
- },
99
- {
100
- "Blood_Work_R1": 140,
101
- "Blood_Pressure": 90,
102
- "Blood_Work_R3": 95,
103
- "BMI": 27.2,
104
- "Blood_Work_R4": 5.2,
105
- "Patient_age": 45
106
- }
107
- ]
108
- },
109
- },
110
- },
111
- }
112
- }
113
-
114
-
115
 
116
  # Prediction endpoint
117
  @app.post("/predict")
 
64
  # Root Endpoint
65
  @app.get("/")
66
  def root():
67
+ return {"Welcome to the Sepsis Prediction API! This API provides endpoints for predicting sepsis based on patient data."}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  # Prediction endpoint
70
  @app.post("/predict")