cloud-annotations / javascript-sdk

Use custom trained Cloud Annotations models with TensorFlow.js
MIT License
24 stars 6 forks source link

error when import cloud-annotations #5

Closed mas1515 closed 4 years ago

mas1515 commented 4 years ago

i make simple electron app and i install this package https://www.npmjs.com/package/@cloud-annotations/models

and when i import it like this code i got this error ,

Uncaught SyntaxError: Unexpected token import C:\Users\mas\Desktop\models\electron\WebChimera-Electron-quick-start-master\node_modules\@cloud-annotation\models\src\index.js:1

the image https://pasteboard.co/JagElbW.png

i can't understand what is for , i installed tensorflowjs these version but get error . "@tensorflow/tfjs": "^1.7.4", "@tensorflow/tfjs-node": "^1.7.4"

bourdakos1 commented 4 years ago

Are you using the import syntax? You might need to use the require syntax for electron if it’s node? Or you might need to use the script import in html

mas1515 commented 4 years ago

@bourdakos1 mu code is this

const models = require("@cloud-annotations/models");

but it get this error https://pasteboard.co/JagElbW.png i dont know how call @cloud-annotations/models
in my electron app .

mas1515 commented 4 years ago

@bourdakos1 another question how use my model that trained with cloud annotation tool with tensorflow js library

"@tensorflow/tfjs": "^1.7.4", "@tensorflow/tfjs-node": "^1.7.4"

without this module

https://www.npmjs.com/package/@cloud-annotations/models

did you maked tutorial for this purpose ??

bourdakos1 commented 4 years ago

You can look at the source code of this module. it’s just a wrapper of TensorFlow.js to make it easier to load models, without having to write logic for things like non-max suppression

mas1515 commented 4 years ago

@bourdakos1 i repeate my question my code is this

const models = require("@cloud-annotations/models");

but it get this error https://pasteboard.co/JagElbW.png i dont know how call @cloud-annotations/models in my electron app .

bourdakos1 commented 4 years ago

I’ve never built an electron app, I’m not sure how you import external libraries. I think this question might be better asked on stack overflow