Hello developers, and welcome back.
In this video we're going to start building our Android application.
Open Android Studio, select a new project empty compose activity and name it as car MPG app.
Click finish and wait for Android Studio to configure the project.
The first step is to add TensorFlow SDK.
So open Build.gradle file, scroll down.
And as we did before in the previous application, let's add those TensorFlow dependencies.
Start with implementation.
We need to add TensorFlow Lite and TensorFlow support.
You can get the latest versions of TensorFlow, but since they are very simple you can write like them.
Okay 2.17 which is the most stable one?
There are newer versions of TensorFlow, but actually they made like mistakes with with the with our
apps and with our tests.
So I keep using 2.17.
And as we learned before, we saw that 2.17 is the most stable ones and the newer versions may contain
bugs.
Okay, so till now use this and support 2.00.5 okay.
Let's sync.
Now the second step is to add this file, the Tflite file that we created before.
And we trained the model to create it to our Android studio.
So here inside this app folder create a new others TensorFlow Lite model.
Select the model location which is the desktop and select it car mpg prediction Tflite which will add
build features and dependencies to build the Gradle, the ML binding and the TensorFlow metadata.
Those dependencies and dependencies will be automatically added.
Also, you can add TensorFlow Lite GPU dependencies to build Gradle.
You can select it no problem.
Or you can ensure that you run your application on physical device so there is no need to use GPU.
Because emulators doesn't support GPU in or you need to configure it with higher and advanced settings.
Okay, so for now we are good.
Uh, select automatically add build features and dependencies.
To build Gradle, click Finish and Wait Android studio to configure the project.
And here we go.
This is our ML package that contains the card and pkg tflite file.
And this is our model.
Okay so congratulations we've added TensorFlow and we've added the model to our application.