from fastapi import FastAPI app = FastAPI() @app.get("/") def home(): return {"message": "Hello from FastAPI on Hugging Face Spaces!"} @app.get("/greet") def greet(name: str = "Maroof"): return {"greeting": f"Hello, {name}!"}