mattritchey's picture
Update main.py
697988f
raw
history blame
473 Bytes
# 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 uvicorn
app = FastAPI()
#Endpoints
#Root endpoints
@app.get("/")
def root():
return {"API": "Sum of 2 Squares"}
@app.get('/Sum_Square')
async def predict(number_1: int, number_2: int):
prediction = number_1**2 + number_2**2
return prediction