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(input_prompt: str): return f"hello {input_prompt}!"