mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
public link messaging fix
This commit is contained in:
parent
863839190b
commit
e8fe84904c
@ -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))
|
||||
# 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))
|
||||
|
||||
config = self.get_config_file()
|
||||
config["share_url"] = share_url
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user