Spaces:
Running
Running
File size: 614 Bytes
02a7bf9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | from fastapi import FastAPI, File, UploadFile
from fastapi.responses import JSONResponse
from insightface.app import FaceAnalysis
import numpy as np
import cv2
import faiss
import pickle
import os
import uvicorn
import tempfile
from routers import embed_v2, predict
# โ
FastAPI ์ฑ ์์ฑ
app = FastAPI()
app.include_router(embed_v2.router, prefix="/embed")
app.include_router(predict.router, prefix="/predict")
@app.get("/")
def hello():
return {"msg": "Hello FastAPI!"}
# โ
๋ก์ปฌ์์ ์คํํ ๊ฒฝ์ฐ
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
|