Spaces:
Running
Running
File size: 790 Bytes
0ed2ee7 3671cba ee259c3 3671cba 0ed2ee7 d687e0e 0ed2ee7 d687e0e ee259c3 0ed2ee7 ee259c3 0ed2ee7 ee259c3 0ed2ee7 ee259c3 0ed2ee7 ee259c3 0ed2ee7 ee259c3 0ed2ee7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# https://medium.com/@qacheampong/building-and-deploying-a-fastapi-app-with-hugging-face-9210e9b4a713
# https://huggingface.co/spaces/Queensly/FastAPI_in_Docker
from fastapi import FastAPI
import pickle
import uvicorn
import pandas as pd
app = FastAPI()
#Endpoints
#Root endpoints
@app.get("/")
def root():
return {"API": "Sum of 2 Squares"}
@app.get('/Predict_Sepsis')
async def predict(number_1: int,
number_2: int,:
prediction = number_1**2+number_2**2
return prediction
# def make_prediction(data_prepared):
# output_pred = data_prepared
# if output_pred == 0:
# output_pred = "Sepsis status is Negative"
# else:
# output_pred = "Sepsis status is Positive"
# return output_pred |