Spaces:
Paused
Paused
Create main.py
Browse files
main.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
import pickle
|
3 |
+
import uvicorn
|
4 |
+
import pandas as pd
|
5 |
+
|
6 |
+
app = FastAPI()
|
7 |
+
|
8 |
+
|
9 |
+
@app.get("/")
|
10 |
+
def root():
|
11 |
+
return {"API": "An API for Sepsis Prediction."}
|
12 |
+
|
13 |
+
|
14 |
+
@app.get('/Predict')
|
15 |
+
async def predict():
|
16 |
+
return 'output_pred = "Sepsis status is Negative"'
|