Last active
August 1, 2018 07:05
-
-
Save the-dagger/917897953582d92218037adc82a03d5d 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?) { | |
//... | |
//Load a cloud model using the FirebaseCloudModelSource Builder class | |
val cloudSource = FirebaseCloudModelSource.Builder("pokedex") //name of the model created in Firebase Console | |
.enableModelUpdates(true) | |
.build() | |
//Registering the cloud model loaded above with the ModelManager Singleton | |
FirebaseModelManager.getInstance().registerCloudModelSource(cloudSource) | |
//Load a local model using the FirebaseLocalModelSource Builder class | |
val fireBaseLocalModelSource = FirebaseLocalModelSource.Builder("pokedex") | |
.setAssetFilePath("pokedex.tflite") //name of the .tflite model stored in asset folder | |
.build() | |
//Registering the model loaded above with the ModelManager Singleton | |
FirebaseModelManager.getInstance().registerLocalModelSource(fireBaseLocalModelSource) | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment