File size: 356 Bytes
942d992
44f9e3b
9a00a19
 
 
f2e3f46
25d0eb4
44f9e3b
c3ef83f
44f9e3b
 
1
2
3
4
5
6
7
8
9
10
11
12
from fastapi import FastAPI
from fastapi.responses import FileResponse

app = FastAPI()

@app.get("/")
async def read_root():
    # Assuming your PNG file is named "image.png" and is in the same directory as your script
    file_path = "pydvpl_banner.png"
    # Serve the image using FileResponse
    return FileResponse(file_path, media_type="image/png")