diff --git a/gradio/interface.py b/gradio/interface.py index e88e575e80..943167bcd2 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -18,8 +18,7 @@ import time import inspect from IPython import get_ipython -LOCALHOST_IP = "0.0.0.0" -TRY_NUM_PORTS = 100 + PKG_VERSION_URL = "https://gradio.app/api/pkg-version" @@ -32,7 +31,7 @@ class Interface: def __init__(self, fn, inputs, outputs, saliency=None, verbose=False, examples=None, live=False, show_input=True, show_output=True, load_fn=None, capture_session=False, title=None, description=None, - thumbnail=None, server_name=LOCALHOST_IP): + thumbnail=None, server_name=networking.LOCALHOST_NAME): """ :param fn: a function that will process the input panel data from the interface and return the output panel data. :param inputs: a string or `AbstractInput` representing the input interface. diff --git a/gradio/networking.py b/gradio/networking.py index f82f8d8263..7004fc2ff0 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -21,7 +21,7 @@ INITIAL_PORT_VALUE = ( TRY_NUM_PORTS = ( 100 ) # Number of ports to try before giving up and throwing an exception. -LOCALHOST_NAME = "0.0.0.0" +LOCALHOST_NAME = "127.0.0.1" GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request" STATIC_TEMPLATE_LIB = pkg_resources.resource_filename("gradio", "templates/")