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