matiasvlevi / Dann

Deep Neural Network Library for JavaScript.
https://dannjs.org
MIT License
425 stars 23 forks source link

Dann.load() not working #12

Closed davay42 closed 3 years ago

davay42 commented 3 years ago

Seems like net loading is broken. On every net.load('name') i get Uncaught ReferenceError: name is not defined onchange https://null.jsbin.com/runner:1

Dann is loaded from https://cdn.jsdelivr.net/gh/matiasvlevi/dann@v2.2.3d/build/dann.min.js

https://jsbin.com/kedijibewi/edit?js,console,output Check it out here.

It's the only major bug preventing me from deeper experiments with Dann.

davay42 commented 3 years ago

And by the way, I'm building my UI with vue and there should be a more flexible way to display the load file button – we would need to place it in a certain place at least, and add styling also.

matiasvlevi commented 3 years ago

As of version 2.2.4, I've added a way to add the <input> element in a specific HTML element by referencing the ID. See v2.2.4 change log for more details.

And for the styling part, the <input> element has an ID called upload. styling example:

#upload {
    /* <input> element styling here */
}
matiasvlevi commented 3 years ago

Also I found it works on a html page I made myself but not in JSBin. I'm working on finding a solution to make it work despite the different environments.