Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

connect react.js to Google Collab

I want to make a simple image classification app such that the training/classification is done in a Python script. I want to create a web app for it (preferably in React.js) where the user can select parameters or the activation function etc.

To link the front-end with backend, I was planning to use the flaskAPI. However, since the training data could be large, I wanted to use GoogleColab for the ML/Python part. Is it possible to run my front-end such that it's linked to Google Colab? I couldn't find any relevant examples.


1 Answers

Here is a simple, step-by-step demo of how to build a Python-Flask application, host it in Google Colab and then access it from the public internet ( using a public URL) using NGROK tunnels. The demo is available in GitHub Repository. The first five apps have no machine learning component but demonstrate basic input-output abilities. There are two machine learning apps, one with linear regression and one with decision tree that is used for Image Classification. While we do not use React.js we do address the issue of accessing a ML model through a web API. Do note that the ML models have to built separately and should be available for loading into the Colab VM either from Google Drive ( as in this case) or from/through some other mechanism.

like image 78
Calcutta Avatar answered Nov 24 '25 19:11

Calcutta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!