You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Asset from React Native Bundle loadTensorflowModel(require('assets/my-model.tflite'))
When loading from project assets it was working total accurate. But i tried loading from my device local directory like:
// File on the local filesystem loadTensorflowModel('file:///var/mobile/.../my-model.tflite')
it says [Error: TFLite: Invalid source passed! Source should be either a React Native require(..) or a { url: string }object!]
I tried using with loadTensorflowModel('https://tfhub.dev/google/lite-model/object_detection_v1.tflite')
but it says JNI error exception, expect http or https but recieve "file://"
I am using "react-native-fast-tflite": "^1.2.0"
Any solution how can i load my model from my device local directory?
The text was updated successfully, but these errors were encountered:
if I use { url: 'https://'+file_path }
error: JNI GetObjectRefType called with pending exception java.net.UnknownHostException: Unable to resolve host "file": No address associated with hostname
and if i use { url: file_path }:
Error: JNI DETECTED ERROR IN APPLICATION: JNI GetObjectRefType called with pending exception java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but was 'file'
Gotcha, yea well this should work and shouldn't be easy to fix. If you fix this, please send a PR. Otherwise I don't have time to fix this now because of other libraries.
// Asset from React Native Bundle loadTensorflowModel(require('assets/my-model.tflite'))
When loading from project assets it was working total accurate. But i tried loading from my device local directory like:
// File on the local filesystem loadTensorflowModel('file:///var/mobile/.../my-model.tflite')
it says
[Error: TFLite: Invalid source passed! Source should be either a React Native require(..) or a { url: string }object!]
I tried using with
loadTensorflowModel('https://tfhub.dev/google/lite-model/object_detection_v1.tflite')
but it says
JNI error exception, expect http or https but recieve "file://"
I am using "react-native-fast-tflite": "^1.2.0"
Any solution how can i load my model from my device local directory?
The text was updated successfully, but these errors were encountered: