Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
A library for running TF Lite models
Add the dependency to your shard.yml
:
dependencies:
tensorflow_lite:
github: spider-gazelle/tensorflow_lite
Run shards install
require "tensorflow_lite"
you can use the example metadata extractor to obtain the metadata for TF Lite models downloaded from tfhub.dev
To update tensorflow lite bindings ./generate_bindings.sh
Requires libtensorflow to be installed, this is handled automatically by ./build_tensorflowlite.sh
./build_tensorflowlite.sh
to automate thisexport LD_LIBRARY_PATH=/usr/local/lib
to runcrystal ./src/tensorflow_lite.cr
Launching with tensorflow lite vx.x.x
NOTE:: the lib is installed for local use via a postinstall script.
Make sure to distribute libtensorflowlite_c.so
with your production app
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)