From aae29b48feb643af27a26be3843e52860766be09 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 6 May 2024 14:03:41 -0400 Subject: [PATCH] You don't need this anymore --- .gitignore | 3 --- README.md | 19 +++++++++---------- structures/Tensorflow.js | 7 +------ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 6f0a6741..68f69b65 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,6 @@ blacklist.json # DECTalk dectalk/ -# Tensorflow Models -tf_models/ - # Mac Files .DS_Store diff --git a/README.md b/README.md index 2a609a63..ce155054 100644 --- a/README.md +++ b/README.md @@ -97,16 +97,15 @@ things, I'm not taking any chances. 9. [Follow these instructions to install ImageMagick](https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/). 10. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password! 11. Run `apt install libtool` so sodium can compile if necessary. **(Optional)** -12. Download [the NSFW model](https://github.com/gantman/nsfw_model) and extract the contents to `/tf_models/nsfw`. -13. Download DECTalk and extract `dectalk.dll`, `dtalk_us.dic`, `MSVCRTd.DLL`, and `say.exe` to `dectalk/`. I cannot help you find this. -14. Run `apt install wine` to install wine. -15. Run `dpkg --add-architecture i386` to allow installation of wine32. -16. Run `apt update` again. -17. Run `apt install wine32` to install wine32. -18. Run `apt install xvfb` to install xvfb. -19. Run `yarn install --production` in the folder you cloned the bot. -20. Run `npx parse-domain-update` to update the domain list for `parse-domain`. -21. Start Xiao up! +12. Download DECTalk and extract `dectalk.dll`, `dtalk_us.dic`, `MSVCRTd.DLL`, and `say.exe` to `dectalk/`. I cannot help you find this. +13. Run `apt install wine` to install wine. +14. Run `dpkg --add-architecture i386` to allow installation of wine32. +15. Run `apt update` again. +16. Run `apt install wine32` to install wine32. +17. Run `apt install xvfb` to install xvfb. +18. Run `yarn install --production` in the folder you cloned the bot. +19. Run `npx parse-domain-update` to update the domain list for `parse-domain`. +20. Start Xiao up! ## Commands Total: 510 diff --git a/structures/Tensorflow.js b/structures/Tensorflow.js index 2529c020..feb2f2e1 100644 --- a/structures/Tensorflow.js +++ b/structures/Tensorflow.js @@ -2,8 +2,6 @@ const tfnode = require('@tensorflow/tfjs-node'); const nsfw = require('nsfwjs'); const faceDetection = require('@tensorflow-models/face-detection'); const faceModel = faceDetection.SupportedModels.MediaPipeFaceDetector; -const url = require('url'); -const path = require('path'); module.exports = class Tensorflow { constructor(client) { @@ -14,10 +12,7 @@ module.exports = class Tensorflow { } async loadNSFWJS() { - const nsfwjs = await nsfw.load( - `${url.pathToFileURL(path.join(__dirname, '..', 'tf_models', 'nsfw', 'web_model')).href}/`, - { type: 'graph' } - ); + const nsfwjs = await nsfw.load(); this.nsfwjs = nsfwjs; return this.nsfwjs; }