FastapiSample / app.py
tregu0458's picture
Update app.py
ad6e5e4 verified
from fastapi import FastAPI
app = FastAPI(title="Deploying FastAPI Apps on Huggingface")
@app.get("/", tags=["Home"])
def api_home():
return {'detail': 'Welcome to FastAPI Tutorial!'}
@app.post("/",tags=["hello"])
def hello(name: str):
return {'message': f"hello {name}!"}