Is there any way for me to link a python back-end function to a flutter mobile application? I have a face recognition method on Python that needs to be linked to my front-end Flutter app.
It must also work offline
Related
In my case I want to use Vosk in python for offline speech recognition and want to develope complete application on react native for handeling rest of the operation for controlling my phone. And this should be completely offline so don't want to setup saperate python server.
You can check their example of Android integration https://alphacephei.com/vosk/android and if you want to create a wrapper for React Native. Also, they have a wrapper for Native Script and you can check how they use it for android, for example here is a list of dependencies https://github.com/alphacep/nativescript-vosk/blob/master/src/platforms/android/include.gradle
UPDATE:
just found that react native vosk wrapper already exists: https://github.com/riderodd/react-native-vosk
I want to develop a WEb-based voting system in java. The system has facial recognition and OTP verification. I have a a facial recognition code in python and the model is 85% accurate. How can I implement facial recognition in my web based voting system?
You can call the python function in your Java code via ProcessBuilder, but it's not recommended unless you are confident in the robust of your python code and you are sure it's easy to maintain in this way.
My advice is to build a python backend service (using Flask, for example, it's a light-weighted framework for python web services) and call your python service via HTTP request in your Java code. By doing this, the two programs are decoupled and might be reused conveniently.
I'm working on Flutter project in Android Studio platform and I faced a problem with how to write and run python API code inside my Flutter project without letting it as a backend code in another platform? since when I run my Flutter project that connected with python API code in another platform as a backend using post method, it's worked with the emulator but it does not work with my physical android device.
So is there any recommend solution for either the first problem or the second.
Thanks.
No it's not possible to write python code Inside Flutter code
But you can write your api in different framework like Django ,mongodb and use it in your Flutter app
I have made an image recognition system using python and I am trying to implement that in website. I have have a system that recognizes the fruit images built using CNN. Now, I have built a website which is of a Fruit-blog. I want a section or a page in in that website in which a user can upload an image and the website can recognize which fruit is the given image of but I have no idea how to implement my recognition system in the website. Can you please help me explaining what to do and how can I implement the AI from python to Django website?
The main part comes from freezing your model and serving it using a web framework like flask or django. Then you can communicate with it by passing images and receiving prediction objects. An example is at this github repo written in Django for deploy in Heroku https://github.com/marcogdepinto/Deep-learning-model-deploy-with-django
I've developed a website for uploading and downloading images using Django. I've also written a python code using the Google Vision API and executed the file successfully on the command line. Now, where should I place that python code in my Django project, so that my images pass through the API?