Is there a way to use Google Colab Form feature in a local Jupyter Notebook?

Viewed 673

I have just installed a Jupyter Notebook in a local conda environment, and I've imported an .ipynb file from Google Colab to run it locally.

I wonder if there's any extension that enables the Form feature from Google Colab to work on a regular Jupyter Notebook, using the same syntax, like this below: enter image description here

PS: I'm aware of the Jupyter Widgets (ipywidgets) package/extension, however the syntax is different from Colab Forms, ideally I would want to keep the same syntax so I could use the same file back and forth between Colab and local easily

1 Answers

Disclaimer: this is not a strict solution to the problem presented by the OP, but it is a viable alternative.

For months I have been looking for a way to have certain Google Colab functionality locally, but to no avail. In particular, to date I haven't found a way to:

  1. Run Google Colab locally (offline).
  2. Have the functionalities of Google Colab forms locally (offline) using the same syntax.

However, since one of the main motivations for using Jupyter locally is to use the computational resources of the local machine, Google Colab offers a very simple way to take advantage of all the features of the platform using a local Jupyter environment:

  1. Upload your notebook to Google Drive and open it with Google Colab.
  2. Click the arrow next to the "Connect" button and then click "Connect to a local runtime".
  1. Follow the instructions.

Then you can use the same file back and forth between Google Colab and your local environment easily.

Result

Related