![](../../../Uploads/64b566c3-492c-4436-aff3-6e042f6b7bee.png)
Today let's learn how to build a tensorflow model on Techable Machine and then run it on flutter app.
Youtube Tutorial : https://www.youtube.com/watch?v=-5kUv47xKy0
Here is how it works when we will press the floating action button we will select an image file and our model will tell if it is a dog or a cat
![](https://fluttercentral.com/Uploads/eb77c251-d192-4924-b183-e19a06ac21ef.png)
For this first we will Create a new flutter project, then remove all the boiler plate code in the main.dart in lib
Now first lets build our model for this we will use Teachable Machine it is a web platform by google where we can create model and can test, and export to run on mobile
![](https://fluttercentral.com/Uploads/a8bce568-2d41-42b5-830b-f66b88e53b88.png)
Step2: There will be two class class1 & class 2 rename them to cat and dog, then now we need images to train our model which you can get here https://www.kaggle.com/tongpython/cat-and-dog
![](https://fluttercentral.com/Uploads/d98832ee-37c0-4290-8766-6ae56b9b6f37.png)
then upload the images which we download for cat and dog respectively
Step3: Click train Model, let it train don't close or switch tab
Step4: Click Export Model
![](https://fluttercentral.com/Uploads/9abcade4-124d-4ea6-9ab2-c343d9adc8a4.png)
Step5: Click on Download my model, it will convert and download the model
now we have the model lets work on Flutter app
Step1: Visit the build.gradle file in app there inside android{} add this
![](https://fluttercentral.com/Uploads/90a5b6df-61b7-4a35-b1b2-ed07c332411f.png)
Step2: Make sure the minSdkVersion is 19
![](https://fluttercentral.com/Uploads/977eda3b-25d6-4155-a7ea-ef4425b0e278.png)
Then now time to get packages
Step3: Get these packages
![](https://fluttercentral.com/Uploads/5011c750-1d27-4020-9760-50f83f1aeae2.png)
Step4: Code for main.dart copy from here https://github.com/theindianappguy/machine_learning_flutter_app/blob/master/lib/main.dart
Step5: Create a assets folder and add the file which we download , (obviously first extract) you will have two file one is model and the other is labes then add this in pubspec.yaml file
![](https://fluttercentral.com/Uploads/48a3d49a-2847-47e7-9a85-8a44c1cfc3d9.png)
Now run, Hurray we have finally create a Flutter app that runs Tensorflow lite model
If you like the blog and it helped then do consider Recommending me on Linkedin for respective skills https://www.linkedin.com/in/lamsanskar/
Thanks, have a great day ahead
Sanskar Tiwari