36 lines
624 B
Python
36 lines
624 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
|
|
PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
|
|
|
API_HOST = os.getenv(
|
|
"API_HOST",
|
|
"http://skin-test-api.ailuowan.com"
|
|
)
|
|
|
|
API_CALLBACK = os.getenv(
|
|
"API_CALLBACK",
|
|
"/api/v1/analysis/callback"
|
|
)
|
|
|
|
ANALYSIS_ROOT = os.getenv(
|
|
"ANALYSIS_ROOT",
|
|
"/data/analysis"
|
|
)
|
|
|
|
MODEL_PATH = os.getenv(
|
|
"MODEL_PATH",
|
|
"/app/best.pt"
|
|
)
|
|
|
|
PORE_PREDICTOR_PATH = os.getenv(
|
|
"PORE_PREDICTOR_PATH",
|
|
str(PROJECT_ROOT / "shape_predictor_68_face_landmarks.dat")
|
|
)
|
|
|
|
PORE_ENABLED = os.getenv(
|
|
"PORE_ENABLED",
|
|
"1"
|
|
).strip().lower() not in {"0", "false", "no", "off"}
|