diff options
author | Kyomotoi <[email protected]> | 2022-09-18 15:25:50 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2022-09-18 15:25:50 +0800 |
commit | 4006dce2581e7d6597958180021974a6de01294e (patch) | |
tree | dbb1ad82008dd456b072c4cda93e9cf044490145 /ATRI/plugins/setu/__init__.py | |
parent | fdb70b4d9ec99e1d2f372a2d9c11e9da344d1b6d (diff) | |
download | ATRI-4006dce2581e7d6597958180021974a6de01294e.tar.gz ATRI-4006dce2581e7d6597958180021974a6de01294e.tar.bz2 ATRI-4006dce2581e7d6597958180021974a6de01294e.zip |
⚡️ 更换涩图检测模型及其 runtime
Diffstat (limited to 'ATRI/plugins/setu/__init__.py')
-rw-r--r-- | ATRI/plugins/setu/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ATRI/plugins/setu/__init__.py b/ATRI/plugins/setu/__init__.py index 71243eb..7962af8 100644 --- a/ATRI/plugins/setu/__init__.py +++ b/ATRI/plugins/setu/__init__.py @@ -99,8 +99,8 @@ async def _setu_catcher(bot: Bot, event: MessageEvent): data = await Setu().detecter(i, _catcher_max_file_size) except Exception: return - if data[1] > 0.7: - hso.append(data[1]) + if data > 0.7: + hso.append(data) hso.sort(reverse=True) @@ -135,8 +135,7 @@ async def _deal_check(bot: Bot, event: MessageEvent): if not args: await nsfw_checker.reject("请发送图片而不是其他东西!!") - data = await Setu().detecter(args[0], _catcher_max_file_size) - hso = data[1] + hso = await Setu().detecter(args[0], _catcher_max_file_size) if not hso: await nsfw_checker.finish("图太小了!不测!") |