public link messaging fix

This commit is contained in:
dawoodkhan82 2020-08-31 17:47:06 -04:00
parent 863839190b
commit e8fe84904c
2 changed files with 11 additions and 11 deletions

View File

@ -309,7 +309,9 @@ class Interface:
if not networking.url_ok(path_to_local_server):
share = True
else:
print(strings.en["RUNNING_LOCALLY"].format(path_to_local_server))
print(strings.en["RUNNING_LOCALLY (To get a public link of a "
"hosted model set Share=True)"].format(
path_to_local_server))
else:
if debug:
print("Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. "
@ -361,15 +363,12 @@ class Interface:
# with the interface.
if inline:
from IPython.display import IFrame, display
if (is_colab):
# Embed the remote interface page if on google colab;
# otherwise, embed the local page.
print("Interface loading below...")
while not networking.url_ok(share_url):
time.sleep(1)
display(IFrame(share_url, width=1000, height=500))
else:
display(IFrame(path_to_local_server, width=1000, height=500))
config = self.get_config_file()
config["share_url"] = share_url

View File

@ -127,7 +127,8 @@ class Image(OutputComponent):
'''
Parameters:
type (str): Type of value to be passed to component. "numpy" expects a numpy array with shape (width, height, 3), "pil" expects a PIL image object, "file" expects a file path to the saved image, "plot" expects a matplotlib.pyplot object.
plot (bool): DEPRECATED. Whether to expect a plot to be returned by the function.
plot (bool): DEPRECATED. Whether to expect a plot figure to be
returned by the function.
label (str): component name in interface.
'''
if plot: