colab embed fix

This commit is contained in:
Ali Abdalla 2019-03-09 18:16:15 -08:00
parent 68c1a91d48
commit 7356f56fe3

View File

@ -153,12 +153,13 @@ class Interface:
networking.set_interface_types_in_config_file(output_directory,
self.input_interface.__class__.__name__.lower(),
self.output_interface.__class__.__name__.lower())
is_colab = False
try: # Check if running interactively using ipython.
from_ipynb = get_ipython()
if 'google.colab' in str(from_ipynb):
is_colab = True
except NameError:
is_colab = False
pass
if self.verbose:
print("NOTE: Gradio is in beta stage, please report all bugs to: a12d@stanford.edu")