Spaces:
Sleeping
Sleeping
Update src/app.py
Browse files- 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 |
-
|
| 73 |
-
# Run the FastAPI application
|
| 74 |
-
|
|
|
|
| 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)
|