check if launched in kaggle notebook

This commit is contained in:
dawoodkhan82 2020-08-07 18:39:42 -04:00
parent 8333cd1b3f
commit 53bf13f066

View File

@ -24,7 +24,8 @@ def colab_check():
is_colab = False is_colab = False
try: # Check if running interactively using ipython. try: # Check if running interactively using ipython.
from_ipynb = get_ipython() from_ipynb = get_ipython()
if "google.colab" in str(from_ipynb): if "google.colab" in str(from_ipynb) or "ipykernel" in str(
from_ipynb):
is_colab = True is_colab = True
except NameError: except NameError:
error_analytics("NameError", analytics_url) error_analytics("NameError", analytics_url)