colab + flask

REST API in Google COLAB

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.

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

‘get_ipython’ used for run the linux command in background

app.py

In the jupyter 6 and 7 cell used for run the flask app.py 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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store