mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
check if launched in kaggle notebook
This commit is contained in:
parent
8333cd1b3f
commit
53bf13f066
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user