'Opening colab from github jupyter notebook converts code to markdown

Example notebook: When I open it in colab by clicking the 'Open in colab' banner or directly: the code cells convert to markdown even though they are code cells in the original jupyter notebook. What am I doing wrong?



Solution 1:[1]

I managed to resolve the issue by editing metadata of jupyter notebook, replacing "text" by "code" in "colab_type":

"cell_type": "code", "execution_count": null, "metadata": { "colab_type": "text"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ivan Gordeli