Skip to content

pribadihcr/electron_tensorflow_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron with Tensorflow example

ENVIRONMENTS

  • Ubuntu 16.04 LTS
  • Anaconda 3.6.4

Install necessary python packages

pip install zerorpc
pip install pyinstaller
pip install tensorflow

Clean the caches

rm -rf ~/.node-gyp
rm -rf ~/.electron-gyp
rm -rf ./node_modules

Run npm

npm install --runtime=electron --target=2.0.2

Testing before build the package. Open new terminal

python pyDL/api.py

Open another terminal terminal

./node_modules/.bin/electron .

Try click button. If it shows Tensorflow: 1.8 then succeed, else what is the error (make issue)

If testing above succeed, we can make a package. Python executable

pyinstaller pyDL/api.py --distpath pyDLdist

rm -rf build/
rm -rf api.spec

Install electron-rebuild to avoid 'NODE_MODULE_VERSION' error

Install electron-rebuild
./node_modules/.bin/electron-rebuild

Package the app

./node_modules/.bin/electron-packager . --overwrite --ignore="pyDL$"

Execute the app

./electron_TF_example-linux-x64/electron_TF_example-linux-x64

If you still see any error please report/write in this readme.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published