简体   繁体   English

如何将 Flutter 应用程序与 ipynb/colab 笔记本集成?

[英]How do I integrate a Flutter application with ipynb/colab notebook?

We currently have a working application that is ready to post and get data from an API which displays results of predicted disease (purpose of the ML model).我们目前有一个工作应用程序,可以从 API 发布和获取数据,该应用程序显示预测疾病的结果(ML 模型的目的)。 Right now we don't have an exact idea on how to make the.ipynb communicate with the application provided we have large data for training the model.现在我们对如何使 .ipynb 与应用程序通信没有确切的想法,只要我们有大量数据来训练 model。

We have 2.ipynb files Model.py and Predict.py .我们有 2.ipynb 文件Model.pyPredict.py One performing the required pre-processing, split (for train, test and validation), train and save the model.一个执行所需的预处理、拆分(用于训练、测试和验证)、训练和保存 model。 Predict uses the saved model and classifies the user input. Predict 使用保存的 model 并对用户输入进行分类。

The main concern is how do we send the data from User's end-point(Flutter Application) to Predict.py and get the result data back to the user on the application.主要关注的是我们如何将数据从用户的端点(Flutter 应用程序)发送到Predict.py并将结果数据返回给应用程序上的用户。

We have considered the idea of hosting the model with prediction somewhere, but do not know on how to proceed further.我们已经考虑过在某处托管 model 并进行预测的想法,但不知道如何进一步进行。

This is my first encounter with handling Deep Learning with Flutter Application.这是我第一次使用 Flutter 应用程序处理深度学习。 Any kind of information on proceeding forward will be very helpful.任何有关继续前进的信息都将非常有帮助。

First, .ipynb files are Jupyter Notebooks.首先,.ipynb 文件是 Jupyter Notebooks。

Second, do you have your API ready?其次,您的 API 准备好了吗? Is there a server dedicated to it or is there only the flutter app, that is ony the front of your application.是否有专门的服务器,或者只有 flutter 应用程序,即应用程序的前端。

If you do not have an API, you have to create one (using whatever framework you want).如果您没有 API,则必须创建一个(使用您想要的任何框架)。 To facilitate things, create it in Python, and you can directly import your model as a Python module and use it.为方便起见,在 Python 中创建它,您可以直接将 model 导入为 Python 模块并使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM