randysim / Learner

A deep learning ai chat bot for discord.js
53 stars 16 forks source link

lnr command not working #4

Open qixuannL opened 3 years ago

qixuannL commented 3 years ago

(node:16336) UnhandledPromiseRejectionWarning: Error: Path C:\Users\phone\OneDrive\Desktop\TextAI\model.json does not exist: loading failed at C:\Users\Administrator\Desktop\Learner-master\Learner-master\node_modules\@tensorflow\tfjs-node\dist\io\file_system.js:67:23 (Use node --trace-warnings ... to show where the warning was created) (node:16336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:16336) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Hello, It return this error when I try to run the lnr command,

if (!model) { model = await tf.loadLayersModel("file:///Users/phone/OneDrive/Desktop/TextAI/model.json"); Session.addModel(model); }

I tried to change the path to my own and create a new file named "model.json" But it still doesn't work. Can you help me fix this issue? Thanks

randysim commented 3 years ago

Still seems like a path issue. The problem is that model.json does not exist meaning that you may have provided the wrong path. Note: for some reason some people's desktops aren't located within OneDrive so try removing OneDrive from the path and see if it works.

qixuannL commented 3 years ago

umm... I don't think the project that you have posted included the model.json file. Also, is there something that is hardcoded I have to change for the bot to work? (exclude the discord ID thing)

qixuannL commented 3 years ago

hello.. what should I do to fix this problem?

randysim commented 3 years ago

There is a tftrain.js command in the Commands folder. Go to that command file and edit the model.json save location. Then run the bot, and run the tftrain command as you would a normal command. This should generate the model.json for you.