Open oskarpyke opened 3 years ago
Thanks @oskarpyke for sharing this issue and some of the code in question. I agree with your confusion, and it'd be great o have your help in addressing this since I haven't worked with Vue. Could you possibly point me to a repo/REPL for your Vue project or a minimal example that I can use to test and debug this?
@bomanimc Hello, I've also found this error trying to do a similar thing. Would you be able to help?
A solution to this issue that I found is to place the model folder in the 'public' folder and then link to it naturally from your Vue component.
For example:
Link your trained model weights like this:
const rnn = ml5.charRNN('/ml5-model/', () => {console.log('Model loaded')})
Rather than this: (how one might think to link it as it is in a separate folder to 'src')
const rnn = ml5.charRNN('../../public/ml5-model/', () => {console.log('Model loaded')})
Dear ml5 community,
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
I'm trying to load a pre-trained CharRNN model into my Vue project, but it looks like the JSON isn't being read properly. There's probably some kind of webpack asset management problem, but the error message doesn't give me a lot of elbowroom for troubleshooting:
This is the code in question: