Spaces:
Runtime error
Runtime error
reduce score nsfw
Browse files- app/api/route.ts +1 -1
app/api/route.ts
CHANGED
@@ -54,7 +54,7 @@ export async function POST(
|
|
54 |
|
55 |
if (isNSFW?.length) {
|
56 |
const scoreNotSafe = isNSFW?.find((n: { label: string }) => n.label === "no_safe");
|
57 |
-
if (scoreNotSafe?.score > 0.
|
58 |
return Response.json({ status: 401, ok: false, message: "Image is not safe for work." });
|
59 |
}
|
60 |
}
|
|
|
54 |
|
55 |
if (isNSFW?.length) {
|
56 |
const scoreNotSafe = isNSFW?.find((n: { label: string }) => n.label === "no_safe");
|
57 |
+
if (scoreNotSafe?.score > 0.75) {
|
58 |
return Response.json({ status: 401, ok: false, message: "Image is not safe for work." });
|
59 |
}
|
60 |
}
|