Reputation: 43
What I have:
I built a python model which generates a JSON file based on the given input. Now i want my Flutter Application to use this JSON file and to show the required output on the screen. But I don't know how to generate this JSON file whenever requested by my Flutter App. Please guide me with the approach where I will be able to integrate my Python Model with my Flutter Application.
What I want:
Python Model -> Generates a JSON file based on given input on my Flutter App -> Displaying contents of the JSON file on Flutter Application
Upvotes: 2
Views: 3910
Reputation: 1063
You need to serve python (AI) model as a REST (API) service. You can use Django, Flask or FastAPI for this. Then called the API in Flutter, which will return JSON. You can then use the JSON as you like in Flutter.
Another brief example here: https://flutterrepos.com/lib/ketanchoyal-InstaKnow
Upvotes: 3