colab + flask

In this tutorial, I will explain how to expose the rest api using python flask in Google Colab.

I have used ngrok for making the public ip from our local. So download the ngrok and extract it.

!unzip -o

‘!’ command used for run the linux command in colab jupyter

‘get_ipython’ used for run the linux command in background

In the jupyter 6 and 7 cell used for run the flask and ngrok

Cell 8 used for see the public ip. Once you got the ngrok public ip, paste into the browser and see the output.

This is the complete google colab code.

Artificial Intelligence and Data Science