diff --git a/components/label/api/label/index.ts b/components/label/api/label/index.ts index 72775e7..47179ec 100644 --- a/components/label/api/label/index.ts +++ b/components/label/api/label/index.ts @@ -120,6 +120,13 @@ export const getAuxiliaryAnnotation = (data: any) => { }) } +const BASE_SAM_API = + process.env.NEXT_PUBLIC_ENV === "production" + ? "http://172.16.103.224:9120" + : process.env.NEXT_PUBLIC_ENV === "staging" + ? "http://172.30.21.211:8000" + : "http://172.30.21.211:8000" + export const getAuxiliaryAnnotation2 = (data: { project_id: number image_name: string @@ -133,7 +140,7 @@ export const getAuxiliaryAnnotation2 = (data: { contours: Array> hollows: Array }>({ - url: "http://172.30.21.211:8000/api/sam2/image_predictor", + url: BASE_SAM_API + "/api/sam2/image_predictor", method: "POST", body: JSON.stringify(data), })