chawin.chen
commited on
Commit
·
43cf0d0
1
Parent(s):
b7c8a19
fix
Browse files- api_routes.py +2 -0
api_routes.py
CHANGED
|
@@ -1136,11 +1136,13 @@ async def analyze_face(
|
|
| 1136 |
is_safe = await wx_access_token.check_image_security(security_payload)
|
| 1137 |
logger.info(f"Checking image content safety, time: {time.perf_counter() - t1:.3f}s")
|
| 1138 |
if not is_safe:
|
|
|
|
| 1139 |
await _record_output_file(
|
| 1140 |
file_path=original_image_path,
|
| 1141 |
nickname=nickname,
|
| 1142 |
category="original",
|
| 1143 |
score=0.0,
|
|
|
|
| 1144 |
extra={
|
| 1145 |
"source": "security",
|
| 1146 |
"role": "annotated",
|
|
|
|
| 1136 |
is_safe = await wx_access_token.check_image_security(security_payload)
|
| 1137 |
logger.info(f"Checking image content safety, time: {time.perf_counter() - t1:.3f}s")
|
| 1138 |
if not is_safe:
|
| 1139 |
+
upload_file_to_bos(original_image_path)
|
| 1140 |
await _record_output_file(
|
| 1141 |
file_path=original_image_path,
|
| 1142 |
nickname=nickname,
|
| 1143 |
category="original",
|
| 1144 |
score=0.0,
|
| 1145 |
+
bos_uploaded=True,
|
| 1146 |
extra={
|
| 1147 |
"source": "security",
|
| 1148 |
"role": "annotated",
|