File size: 276 Bytes
ae84db8
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello Hugging Face Docker!"}

if __name__ == "__main__":
    import uvicorn
    # Run on 0.0.0.0:7860 for Hugging Face Spaces
    uvicorn.run(app, host="0.0.0.0", port=7860)