You can use the tflite_flutter package when you want to integrate a TensorFlow Lite model in your Flutter apps. The advantages of using this package include the following:
- No need to write any platform-specific code.
- It can use any tflite model.
- It runs on the device itself (no need to connect to a server).
A TensorFlow Lite model uses the .tflite extension. You can also convert existing TensorFlow models into TensorFlow Lite models. The procedure is available at https://www.tensorflow.org/lite/convert.
In the assets folder of the app, you placed two files: the tflite model and a vocabulary text file. The vocabulary contains 10,000 words that are used by the model to retrieve the positive and negative sentiments.
You can use this classification model, and all the models available in TensorFlow Hub, in your apps as they are released with an Apache 2.0 license (details here: https://github.com/tensorflow/hub/blob/master/LICENSE).
Before classifying the string...