rasmodev commited on
Commit
1ef265d
1 Parent(s): c47f122

Update src/app.py

Browse files
Files changed (1) hide show
  1. src/app.py +5 -4
src/app.py CHANGED
@@ -1,5 +1,6 @@
1
  from fastapi import FastAPI, HTTPException
2
  from pydantic import BaseModel
 
3
  import pickle
4
  import pandas as pd
5
 
@@ -68,7 +69,7 @@ async def predict_sepsis(input_data: InputData):
68
  # Handle exceptions and return an error response
69
  raise HTTPException(status_code=500, detail=str(e))
70
 
71
- if __name__ == "__main__":
72
- import uvicorn
73
- # Run the FastAPI application on the local host and port 8000
74
- CMD ["uvicorn", "app:app", "--host", "127.0.0.1", "--port", "8000", "--reload"]
 
1
  from fastapi import FastAPI, HTTPException
2
  from pydantic import BaseModel
3
+ import uvicorn
4
  import pickle
5
  import pandas as pd
6
 
 
69
  # Handle exceptions and return an error response
70
  raise HTTPException(status_code=500, detail=str(e))
71
 
72
+ if __name__ == "__main__":
73
+
74
+ # Run the FastAPI application
75
+ uvicorn.run(app, host="0.0.0.0", port=8000, reload=True)