Skip to content

Instantly share code, notes, and snippets.

@martinwairegi
Created August 20, 2021 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinwairegi/8131df98a80bdb6e234f8ea159d90415 to your computer and use it in GitHub Desktop.
Save martinwairegi/8131df98a80bdb6e234f8ea159d90415 to your computer and use it in GitHub Desktop.
private fun initTensorFlowAndLoadModel() {
executor.execute {
try {
classifier = Classifier.create(
assets,
MODEL_PATH,
LABEL_PATH,
INPUT_SIZE)
makeButtonVisible()
} catch (e: Exception) {
throw RuntimeException("Error initializing TensorFlow!", e)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment