ai-challenge / app.py
Sebastian Kułaga
Frontend
deb9cdb
raw
history blame contribute delete
506 Bytes
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse
from routers.distilbert import prediction
# Create a new FastAPI app instance
app = FastAPI()
app.include_router(prediction)
app.mount("/", StaticFiles(directory="static", html=True), name="static")
@app.get("/")
def index() -> FileResponse:
return FileResponse(path="/static/index.html", media_type="text/html")
# def greet_json():
# return {"detail": "AI Challenge FastAPI"}