Spaces:
Runtime error
Runtime error
from fastapi import FastAPI | |
from fastapi.responses import FileResponse | |
from fastapi.staticfiles import StaticFiles | |
from pathlib import Path | |
app = FastAPI() | |
app.mount("/static", StaticFiles(directory=Path("static")), name="static") | |
async def root(): | |
return FileResponse("static/index.html") | |
async def predict(): | |
return {"prediction": "Hello, World!"} | |