Created
August 1, 2018 07:50
-
-
Save the-dagger/74cc344448f19bf422b957928e9e8cde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
//... | |
private fun getPokemonFromBitmap(bitmap: Bitmap?) { | |
val inputs = FirebaseModelInputs.Builder() | |
.add(convertBitmapToByteBuffer(bitmap)) // add() as many input arrays as your model requires | |
.build() | |
fireBaseInterpreter.run(inputs, inputOutputOptions) | |
?.addOnSuccessListener { | |
//The interpreter identified a Pokemon | |
} | |
?.addOnFailureListener { | |
//The interpreter failed to identify a Pokemon | |
} | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment