Is there a way to work with Python (e.g.: TensorFlow or Sci-kit learn libs) in Flutter apps?

3,057

Solution 1

You can use your python (scikit-learn) code neither in iOS nor in Android.

However, the Tensorflow is available for mobile.

Currently, you cannot use Tensorlfow directly in your Flutter application (with Dart), but you can use it in the native part of your mobile app and link it to your Flutter application using platform-channels

Hope it helps.

Solution 2

Flutter builds the apps. The apps can communicate with any backend of your choice - or with multiple backends if you need it. For example, it can connect to Firebase for user data, etc., and connect to a different backend for machine learning (e.g. Google Cloud AI).

Solution 3

Yes It's possible and quite easy to use scikit learn and other python packages such as numpy, scipy, pandas, etc using chaquopy plugin for flutter.

Solution 4

Rather you can use python plus tensowflow in your jupyter notebook and train your model and then upload your custom model on the firebase ml kit and from their you can use it.

The ml kit in the firebase is very handy in applying machine learning.

Share:
3,057
Victor Maricato
Author by

Victor Maricato

Updated on November 28, 2022

Comments

  • Victor Maricato
    Victor Maricato over 1 year

    I am creating an app for school and I could use some Machine Learning in it. Although, the libraries I know that I could use to process and predict my data are all for Python.

    Is there a way that I could get data from Flutter app, process it in a Python backend and return the output to the Flutter app?

    Or is there an alternative I could use on Flutter? I already plan to use Firebase in the app, is there any kind of machine learning tool for data stored on Firebase?

    Thanks.

    • rmtmckenzie
      rmtmckenzie about 6 years
      Are you wanting to do the processing with Python on the device or on a server?
    • Victor Maricato
      Victor Maricato about 6 years
      What I was planning to do was do the process directly on the device, connecting it just with Firebase.
  • Victor Maricato
    Victor Maricato about 6 years
    I don't know Google Cloud AI yet, can I run tensorflow and scikit-learn codes on it?
  • Andrei Volgin
    Andrei Volgin about 6 years
    If you need TensorFlow, you can run it anywhere you like, e.g. Google Cloud Platform, AWS, or on your own server. And make your Flutter app talk to it like it would talk to any other server.
  • LabGecko
    LabGecko almost 5 years
    To your knowledge is this still the case now?
  • Javid Noutash
    Javid Noutash almost 5 years
    There is this new plugin that helps accessing Tensorflow Lite APIs in Flutter. pub.dev/packages/tflite I haven't used it myself but looks promissing.