Skip to content

Commit

Permalink
check if launched in kaggle notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
dawoodkhan82 committed Aug 7, 2020
1 parent 8333cd1 commit 53bf13f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gradio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def colab_check():
is_colab = False
try: # Check if running interactively using 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
except NameError:
error_analytics("NameError", analytics_url)
Expand Down

0 comments on commit 53bf13f

Please sign in to comment.