I am trying to use tensorflow lite to run a tflite model, but after adding this to the dependencies and syncing gradle
implementation("com.google.ai.edge.litert:litert:1.0.1")
implementation("com.google.ai.edge.litert:litert-support:1.0.1")
tensorflow is not found:
Unresolved reference: tensorflow
This is my file:
import org.tensorflow.lite.Interpreter
import org.tensorflow.lite.support.common.FileUtil
import org.tensorflow.lite.support.metadata.MetadataExtractor
class OutputModel: TensorflowInferenceRunner {
private val interpreter: Interpreter
init {
// Load the TensorFlow Lite model
val model = FileUtil.loadMappedFile(context, "model.tflite")
interpreter = Interpreter(model)
}
}
I also tried with runtimeOnly("org.tensorflow:tensorflow-lite:2.17.0") as dependency, but I get the same error.
I am trying to use tensorflow lite to run a tflite model, but after adding this to the
dependenciesand syncing gradletensorflowis not found:Unresolved reference: tensorflowThis is my file:
I also tried with
runtimeOnly("org.tensorflow:tensorflow-lite:2.17.0")as dependency, but I get the same error.