Spaces:
Sleeping
Sleeping
File size: 324 Bytes
863f7a5 | 1 2 3 4 5 6 7 8 9 10 11 | from fastapi import FastAPI
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
app = FastAPI()
app.mount("/static", StaticFiles(directory=".", html=True), name="static")
@app.get("/", response_class=HTMLResponse)
def root():
with open("index.html","r") as f:
return f.read() |