Sonny4Sonnix commited on
Commit
955fee0
·
1 Parent(s): ab66923

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -7
main.py CHANGED
@@ -26,18 +26,18 @@ class InputFeatures(BaseModel):
26
  xgb_model = joblib.load("model.joblib")
27
 
28
 
29
- @app.get("/")
30
- async def read_root():
31
- return {"message": "Welcome to the Sepsis Prediction API"}
32
 
33
- @app.get("/form/")
34
- async def show_form():
35
 
36
  @app.post("/predict/")
37
- async def predict_sepsis():
38
  request: Request,
39
  input_data: InputFeatures # Use the Pydantic model for input validation
40
-
41
  try:
42
  # Convert Pydantic model to a DataFrame for prediction
43
  input_df = pd.DataFrame([input_data.dict()])
 
26
  xgb_model = joblib.load("model.joblib")
27
 
28
 
29
+ # @app.get("/")
30
+ # async def read_root():
31
+ # return {"message": "Welcome to the Sepsis Prediction API"}
32
 
33
+ # @app.get("/form/")
34
+ # async def show_form():
35
 
36
  @app.post("/predict/")
37
+ async def predict_sepsis(
38
  request: Request,
39
  input_data: InputFeatures # Use the Pydantic model for input validation
40
+ ):
41
  try:
42
  # Convert Pydantic model to a DataFrame for prediction
43
  input_df = pd.DataFrame([input_data.dict()])