Closed devillD closed 2 years ago
Custom NSFW API? this project uses python-arq
, which is a wrapper for ARQ API, and ARQ uses https://github.com/GantMan/nsfw_model/ underneath
Check this: https://api-devilld.cloud.okteto.net/?url=https://i.ibb.co/tmFJdwy/model.jpg I deployed that with your repo though. But the model is https://index-production.up.railway.app/nsfw_model_224x224_10MB.h5 Where, your default model is https://index-production.up.railway.app/nsfw_model_299x299_151MB.h5
Check this: https://api-devilld.cloud.okteto.net/?url=https://i.ibb.co/tmFJdwy/model.jpg I deployed that with your repo though. But the model is https://index-production.up.railway.app/nsfw_model_224x224_10MB.h5 Where, your default model is https://index-production.up.railway.app/nsfw_model_299x299_151MB.h5
Well, if you want to change the model/API that the bot is using or you want to use something custom, you can do it with a little change, just replace things like https://github.com/TheHamkerCat/SpamProtectionRobot/blob/03cad607d4c613d9fe4facd0ec5e202a43cc9991/spr/modules/watcher.py#L59 and https://github.com/TheHamkerCat/SpamProtectionRobot/blob/03cad607d4c613d9fe4facd0ec5e202a43cc9991/spr/modules/watcher.py#L76 with your own API request, make sure the response is completely same, then convert the response json to dotmap and everything should work as expected
Got it! Thank you so much.
Kindly add support for custom NSFW API users. I wanna test a different model for the NSFW project. It would be very helpful. Thank you