From e5601a851cbd4cdfa627e4f200ff08ee148613c1 Mon Sep 17 00:00:00 2001 From: am15h Date: Fri, 13 Aug 2021 20:14:42 +0530 Subject: [PATCH] update bindings --- lib/src/task/bindings/dlib.dart | 2 +- lib/src/task/text/nl_classifier/nl_classifier.dart | 3 ++- lib/tflite_flutter_helper.dart | 2 ++ pubspec.yaml | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/src/task/bindings/dlib.dart b/lib/src/task/bindings/dlib.dart index 8316722..a857888 100644 --- a/lib/src/task/bindings/dlib.dart +++ b/lib/src/task/bindings/dlib.dart @@ -29,7 +29,7 @@ String get binaryName { // ignore: missing_return DynamicLibrary tflitelib = () { if (Platform.isAndroid) { - return DynamicLibrary.open('libtensorflowlite_c.so'); + return DynamicLibrary.open('libtask_text_jni.so'); } else if (Platform.isIOS) { return DynamicLibrary.process(); } else { diff --git a/lib/src/task/text/nl_classifier/nl_classifier.dart b/lib/src/task/text/nl_classifier/nl_classifier.dart index 87ff484..361e4d0 100644 --- a/lib/src/task/text/nl_classifier/nl_classifier.dart +++ b/lib/src/task/text/nl_classifier/nl_classifier.dart @@ -13,7 +13,8 @@ class NLClassifier { NLClassifier._(this._classifier); - factory NLClassifier._create(String modelPath, NLClassifierOptions options) { + // TODO: create convenience constructors + factory NLClassifier.create(String modelPath, NLClassifierOptions options) { final classiferPtr = NLClassifierFromFileAndOptions(modelPath.toNativeUtf8(), options.base); return NLClassifier._(classiferPtr); diff --git a/lib/tflite_flutter_helper.dart b/lib/tflite_flutter_helper.dart index f4a5300..9ac83d0 100644 --- a/lib/tflite_flutter_helper.dart +++ b/lib/tflite_flutter_helper.dart @@ -39,3 +39,5 @@ export 'src/tensorbuffer/tensorbufferuint8.dart'; export 'src/audio/recorder_stream.dart'; export 'src/audio/sound_stream.dart'; export 'src/audio/tensor_audio.dart'; +export 'src/task/text/nl_classifier/nl_classifier.dart'; +export 'src/task/text/nl_classifier/nl_classifier_options.dart'; \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index e0228c3..90e9bb7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,8 @@ dependencies: meta: ^1.1.8 quiver: ^3.0.1 path_provider: ^2.0.1 - tflite_flutter: ^0.9.0 + tflite_flutter: + path: ../tflite_flutter_plugin image: ^3.0.2 tuple: ^2.0.0 ffi: ^1.0.0