File size: 636 Bytes
fef8a16
c3e46dc
 
6d73052
fef8a16
 
 
 
 
6d73052
fef8a16
 
 
6d73052
fef8a16
 
6d73052
 
 
 
 
fef8a16
6d73052
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

# Line for test push

from fastapi import FastAPI, APIRouter
from fastapi.staticfiles import StaticFiles
from starlette.responses import FileResponse
from transformers import pipeline

app = FastAPI()
router = APIRouter()

# Monter les fichiers statiques

@router.get("/")
async def index() -> FileResponse:
    return FileResponse(path="front/dist/index.html", media_type="text/html")
@router.get("/verification")
async def verif() -> FileResponse:
    return FileResponse(path="front/dist/index.html", media_type="text/html")

app.include_router(router)

app.mount("/", StaticFiles(directory="front/dist", html=True), name="static")