fix(env): sam2

This commit is contained in:
zhangheng
2026-04-08 16:49:30 +08:00
parent ce3c01b43a
commit 8c18cc2b78

View File

@@ -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<Array<[[number, number]]>>
hollows: Array<boolean>
}>({
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),
})