From 9d54d13d54bea63786d54ef67d1696402ad4eb11 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Fri, 17 Dec 2021 10:43:11 -0600 Subject: [PATCH 01/13] allows you to fix port; deprecates server_port, server_name parameters in Interface() --- gradio/interface.py | 29 ++++++++++++----------------- gradio/networking.py | 20 +++++++++++++++----- test/test_networking.py | 1 - 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/gradio/interface.py b/gradio/interface.py index 557187d2ce..7884f0a76c 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -63,9 +63,8 @@ class Interface: examples_per_page=10, live=False, layout="unaligned", show_input=True, show_output=True, capture_session=None, interpretation=None, num_shap=2.0, theme=None, repeat_outputs_per_model=True, title=None, description=None, article=None, thumbnail=None, - css=None, server_port=None, server_name=None, height=500, width=900, - allow_screenshot=True, allow_flagging=None, flagging_options=None, encrypt=False, - show_tips=None, flagging_dir="flagged", analytics_enabled=None, enable_queue=None, api_mode=None): + css=None, height=500, width=900, allow_screenshot=True, allow_flagging=None, flagging_options=None, + encrypt=False, show_tips=None, flagging_dir="flagged", analytics_enabled=None, enable_queue=None, api_mode=None): """ Parameters: fn (Callable): the function to wrap an interface around. @@ -162,12 +161,7 @@ class Interface: "Examples argument must either be a directory or a nested list, where each sublist represents a set of inputs.") self.num_shap = num_shap self.examples_per_page = examples_per_page - - self.server_name = server_name - self.server_port = server_port - if server_name is not None or server_port is not None: - warnings.warn("The server_name and server_port parameters in the `Interface` class will be deprecated. Please provide them in the `launch()` method instead.") - + self.simple_server = None self.allow_screenshot = allow_screenshot # For allow_flagging and analytics_enabled: (1) first check for parameter, (2) check for environment variable, (3) default to True @@ -573,7 +567,6 @@ class Interface: path_to_local_server (str): Locally accessible link share_url (str): Publicly accessible link (if share=True) """ - # Set up local flask server config = self.get_config_file() self.config = config @@ -589,8 +582,8 @@ class Interface: getpass.getpass("Enter key for encryption: ")) # Store parameters - server_name = server_name or self.server_name or networking.LOCALHOST_NAME - server_port = server_port or self.server_port or networking.INITIAL_PORT_VALUE + server_name = server_name or networking.LOCALHOST_NAME + server_port = server_port if self.enable_queue is None: self.enable_queue = enable_queue @@ -696,17 +689,19 @@ class Interface: return app, path_to_local_server, share_url - def close(self): + def close(self, verbose=True): """ Closes the Interface that was launched. This will close the server and free the port. """ try: if self.share_url: requests.get("{}/shutdown".format(self.share_url)) - print("Closing Gradio server on port {}...".format(self.server_port)) + if verbose: + print("Closing Gradio server on port {}...".format(self.server_port)) elif self.local_url: requests.get("{}shutdown".format(self.local_url)) - print("Closing Gradio server on port {}...".format(self.server_port)) + if verbose: + print("Closing Gradio server on port {}...".format(self.server_port)) else: pass # server not running except (requests.ConnectionError, ConnectionResetError): @@ -751,9 +746,9 @@ class Interface: utils.integration_analytics(data) -def close_all(): +def close_all(verbose=True): for io in Interface.get_instances(): - io.close() + io.close(verbose) def reset_all(): diff --git a/gradio/networking.py b/gradio/networking.py index 7afc95aa68..0d55570381 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -32,7 +32,7 @@ from werkzeug.security import safe_join INITIAL_PORT_VALUE = int(os.getenv( 'GRADIO_SERVER_PORT', "7860")) # The http server will try to open on port 7860. If not available, 7861, 7862, etc. TRY_NUM_PORTS = int(os.getenv( - 'GRADIO_NUM_PORTS', "100")) # Number of ports to try before giving up and throwing an exception. + 'GRADIO_NUM_PORTS', "1000")) # Number of ports to try before giving up and throwing an exception. LOCALHOST_NAME = os.getenv( 'GRADIO_SERVER_NAME', "127.0.0.1") GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request" @@ -426,10 +426,20 @@ def queue_thread(path_to_local_server, test_mode=False): break -def start_server(interface, server_name, server_port, auth=None, ssl=None): - port = get_first_available_port( - server_port, server_port + TRY_NUM_PORTS - ) +def start_server(interface, server_name, server_port=None, auth=None, ssl=None): + if server_port is None: # if port is not specified, start at 7860 and search for first available port + port = get_first_available_port( + INITIAL_PORT_VALUE, INITIAL_PORT_VALUE + TRY_NUM_PORTS + ) + else: + try: + s = socket.socket() # create a socket object + s.bind((LOCALHOST_NAME, server_port)) # Bind to the port to see if it's available (otherwise, raise OSError) + s.close() + except OSError: + raise OSError("Port {} is in use. If a gradio.Interface is running on the port, you can close() it or gradio.close_all().".format(server_port)) + port = server_port + url_host_name = "localhost" if server_name == "0.0.0.0" else server_name path_to_local_server = "http://{}:{}/".format(url_host_name, port) if auth is not None: diff --git a/test/test_networking.py b/test/test_networking.py index 4adc7c3d9f..0990e31de9 100644 --- a/test/test_networking.py +++ b/test/test_networking.py @@ -199,7 +199,6 @@ class TestState(unittest.TestCase): def test_state_value(self): io = gr.Interface(lambda x: len(x), "text", "label") - io.launch(prevent_thread_lock=True) app, _, _ = io.launch(prevent_thread_lock=True) with app.test_request_context(): networking.set_state("test") From 3aeda84b8fda9850b3f2f7cbbc73b12be973fade Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 07:06:04 -0600 Subject: [PATCH 02/13] updated PyPi version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0b71af5dca..4158e7cf93 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: setup( name='gradio', - version='2.5.2', + version='2.5.3', include_package_data=True, description='Python library for easily interacting with trained machine learning models', author='Abubakar Abid', From eb7194f7563def402d5efa6c3afff781340065a5 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 07:07:21 -0600 Subject: [PATCH 03/13] updated PyPi version --- gradio.egg-info/PKG-INFO | 9 ++++++--- gradio.egg-info/requires.txt | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gradio.egg-info/PKG-INFO b/gradio.egg-info/PKG-INFO index be380a6ab4..91b49785c9 100644 --- a/gradio.egg-info/PKG-INFO +++ b/gradio.egg-info/PKG-INFO @@ -1,11 +1,14 @@ -Metadata-Version: 1.0 +Metadata-Version: 2.1 Name: gradio -Version: 2.5.2 +Version: 2.5.3 Summary: Python library for easily interacting with trained machine learning models Home-page: https://github.com/gradio-app/gradio-UI Author: Abubakar Abid Author-email: a12d@stanford.edu License: Apache License 2.0 -Description: UNKNOWN Keywords: machine learning,visualization,reproducibility Platform: UNKNOWN +License-File: LICENSE + +UNKNOWN + diff --git a/gradio.egg-info/requires.txt b/gradio.egg-info/requires.txt index ed319be6ca..ff985eefcb 100644 --- a/gradio.egg-info/requires.txt +++ b/gradio.egg-info/requires.txt @@ -1,15 +1,15 @@ -Flask-Cors>=3.0.8 -Flask-Login -Flask>=1.1.1 -analytics-python -ffmpy -flask-cachebuster -markdown2 -matplotlib numpy -pandas -paramiko -pillow -pycryptodome pydub +matplotlib +pandas +pillow +ffmpy +markdown2 +pycryptodome requests +paramiko +analytics-python +Flask>=1.1.1 +Flask-Cors>=3.0.8 +flask-cachebuster +Flask-Login From 33c345fce2ca38902515a5b86c195031f11d08cc Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 11:33:04 -0600 Subject: [PATCH 04/13] fixed Ali's comments --- codecov.yml | 1 + gradio/interface.py | 8 ++++---- gradio/networking.py | 17 ++++++++++------- test/test_interfaces.py | 14 ++++++++++++-- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/codecov.yml b/codecov.yml index ae7639975d..8b8b7bc9de 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,3 +2,4 @@ coverage: range: 0..100 round: down precision: 2 +comment: false diff --git a/gradio/interface.py b/gradio/interface.py index 0844e44315..0fd08387b1 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -30,7 +30,7 @@ class Interface: Interfaces are created with Gradio by constructing a `gradio.Interface()` object or by calling `gradio.Interface.load()`. """ - instances = weakref.WeakSet() # stores all currently existing Interface instances + instances = weakref.WeakSet() # stores references to all currently existing Interface instances @classmethod def get_instances(cls): @@ -595,8 +595,6 @@ class Interface: getpass.getpass("Enter key for encryption: ")) # Store parameters - server_name = server_name or networking.LOCALHOST_NAME - server_port = server_port if self.enable_queue is None: self.enable_queue = enable_queue @@ -760,10 +758,12 @@ class Interface: def close_all(verbose=True): + # Tries to close all running interfaces, but method is a little flaky. for io in Interface.get_instances(): io.close(verbose) def reset_all(): - warnings.warn("The `reset_all()` method has been renamed to `close_all()`. Please use `close_all()` instead.") + warnings.warn("The `reset_all()` method has been renamed to `close_all()` " + "and will be deprecated. Please use `close_all()` instead.") close_all() diff --git a/gradio/networking.py b/gradio/networking.py index 0d55570381..2e04d35488 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -29,18 +29,19 @@ import inspect import traceback from werkzeug.security import safe_join -INITIAL_PORT_VALUE = int(os.getenv( - 'GRADIO_SERVER_PORT', "7860")) # The http server will try to open on port 7860. If not available, 7861, 7862, etc. -TRY_NUM_PORTS = int(os.getenv( - 'GRADIO_NUM_PORTS', "1000")) # Number of ports to try before giving up and throwing an exception. -LOCALHOST_NAME = os.getenv( - 'GRADIO_SERVER_NAME', "127.0.0.1") + +# By default, the http server will try to open on port 7860. If not available, 7861, 7862, etc. +INITIAL_PORT_VALUE = int(os.getenv('GRADIO_SERVER_PORT', "7860")) +# Number of ports to try before giving up and throwing an exception. +TRY_NUM_PORTS = int(os.getenv('GRADIO_NUM_PORTS', "100")) +LOCALHOST_NAME = os.getenv('GRADIO_SERVER_NAME', "127.0.0.1") GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request" GRADIO_FEATURE_ANALYTICS_URL = "https://api.gradio.app/gradio-feature-analytics/" STATIC_TEMPLATE_LIB = pkg_resources.resource_filename("gradio", "templates/") STATIC_PATH_LIB = pkg_resources.resource_filename("gradio", "templates/frontend/static") VERSION_FILE = pkg_resources.resource_filename("gradio", "version.txt") + with open(VERSION_FILE) as version_file: GRADIO_STATIC_ROOT = "https://gradio.s3-us-west-2.amazonaws.com/" + \ version_file.read().strip() + "/static/" @@ -426,7 +427,9 @@ def queue_thread(path_to_local_server, test_mode=False): break -def start_server(interface, server_name, server_port=None, auth=None, ssl=None): +def start_server(interface, server_name=None, server_port=None, auth=None, ssl=None): + if server_name is None: + server_name = LOCALHOST_NAME if server_port is None: # if port is not specified, start at 7860 and search for first available port port = get_first_available_port( INITIAL_PORT_VALUE, INITIAL_PORT_VALUE + TRY_NUM_PORTS diff --git a/test/test_interfaces.py b/test/test_interfaces.py index 6677a0c8cf..53d89e8551 100644 --- a/test/test_interfaces.py +++ b/test/test_interfaces.py @@ -24,10 +24,20 @@ def captured_output(): sys.stdout, sys.stderr = old_out, old_err class TestInterface(unittest.TestCase): - def test_reset_all(self): + def test_close(self): + io = Interface(lambda input: None, "textbox", "label") + io.launch(prevent_thread_lock=True) + port1 = io.server_port + io.close() + io = Interface(lambda input: None, "textbox", "label") + io.launch(prevent_thread_lock=True) + port2 = io.server_port + self.assertEquals(port1, port2) + + def test_close_all(self): interface = Interface(lambda input: None, "textbox", "label") interface.close = mock.MagicMock() - reset_all() + close_all() interface.close.assert_called() def test_examples_invalid_input(self): From 5c1ee52d605acfe7a23c86576f3e1bda6e27f115 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 11:41:07 -0600 Subject: [PATCH 05/13] Update getting_started.md --- guides/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/getting_started.md b/guides/getting_started.md index 6299546461..23288024ee 100644 --- a/guides/getting_started.md +++ b/guides/getting_started.md @@ -269,10 +269,10 @@ And of course, you can also mix `Parallel` and `Series` together whenever that m ### Queuing to Manage Long Inference Times -If many people are using your interface or if the inference time of your function is long (> 1min), simply set the `enable_queue` parameter in the `Interface` class to `True` to prevent timeouts. +If many people are using your interface or if the inference time of your function is long (> 1min), simply set the `enable_queue` parameter in the `launch` method to `True` to prevent timeouts. ```python -gr.Interface(fn=classify_image, inputs=image, outputs=label, enable_queue=True).launch() +gr.Interface(fn=classify_image, inputs=image, outputs=label).launch(enable_queue=True) ``` This sets up a queue of workers to handle the predictions and return the response to the front end. This is strongly recommended if you are planning on uploading your demo to Hugging Face Spaces (as described above) so that you can manage a large number of users simultaneously using your demo. From c927b778fd8c161ccd90efa5872d454e1c486553 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 12:56:27 -0600 Subject: [PATCH 06/13] fixing server issue --- gradio/networking.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/gradio/networking.py b/gradio/networking.py index 2e04d35488..d17b1c7ddb 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -464,15 +464,24 @@ def start_server(interface, server_name=None, server_port=None, auth=None, ssl=N app.queue_thread.start() if interface.save_to is not None: interface.save_to["port"] = port - app_kwargs = {"port": port, "host": server_name} + # app_kwargs = {"port": port, "host": server_name} + # if ssl: + # app_kwargs["ssl_context"] = ssl + # thread = threading.Thread(target=app.run, + # kwargs=app_kwargs, + # daemon=True) + # thread.start() + + app_kwargs = {"app": app, "port": port, "host": server_name} if ssl: app_kwargs["ssl_context"] = ssl - thread = threading.Thread(target=app.run, - kwargs=app_kwargs, - daemon=True) + server = make_server(**app_kwargs) + def run_forever(): + server.serve_forever() + thread = threading.Thread(target=run_forever, daemon=True) thread.start() - - return port, path_to_local_server, app, thread + return port, path_to_local_server, app, thread, server + # return port, path_to_local_server, app, thread def get_state(): return session.get("state") From d03c3a4bfe800245608cb3787568996246669ddd Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 13:04:12 -0600 Subject: [PATCH 07/13] revamped how we close servers --- gradio/interface.py | 27 +++++++++++------------- gradio/networking.py | 49 ++++++++++++++++---------------------------- 2 files changed, 30 insertions(+), 46 deletions(-) diff --git a/gradio/interface.py b/gradio/interface.py index 0fd08387b1..d2bb6ec983 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -588,6 +588,7 @@ class Interface: self.auth = auth self.auth_message = auth_message self.show_tips = show_tips + self.show_error = show_error # Request key for encryption if self.encrypt: @@ -599,13 +600,14 @@ class Interface: self.enable_queue = enable_queue # Launch local flask server - server_port, path_to_local_server, app, thread = networking.start_server( + server_port, path_to_local_server, app, thread, server = networking.start_server( self, server_name, server_port, self.auth) self.local_url = path_to_local_server self.server_port = server_port self.status = "RUNNING" - self.server = app - self.show_error = show_error + self.server = server + self.server_app = app + self.server_thread = thread # Count number of launches utils.launch_counter() @@ -705,18 +707,13 @@ class Interface: Closes the Interface that was launched. This will close the server and free the port. """ try: - if self.share_url: - requests.get("{}/shutdown".format(self.share_url)) - if verbose: - print("Closing Gradio server on port {}...".format(self.server_port)) - elif self.local_url: - requests.get("{}shutdown".format(self.local_url)) - if verbose: - print("Closing Gradio server on port {}...".format(self.server_port)) - else: - pass # server not running - except (requests.ConnectionError, ConnectionResetError): - pass # server is already closed + self.server.shutdown() + self.server_thread.join() + print("Closing server running on port: {}".format(self.server_port)) + except AttributeError: # can't close if not running + pass + except OSError: # sometimes OSError is thrown when shutting down + pass def integrate(self, comet_ml=None, wandb=None, mlflow=None): """ diff --git a/gradio/networking.py b/gradio/networking.py index d17b1c7ddb..4ca06a744c 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -2,33 +2,31 @@ Defines helper methods useful for setting up ports, launching servers, and handling `ngrok` """ -import os -import socket -import threading +import csv +import datetime from flask import Flask, request, session, jsonify, abort, send_file, render_template, redirect from flask_cachebuster import CacheBuster from flask_login import LoginManager, login_user, current_user, login_required from flask_cors import CORS -import threading -import pkg_resources -import datetime -import time +from functools import wraps +import inspect +import io import json -import urllib.request -from shutil import copyfile -import requests -import sys -import csv import logging -from gradio.tunneling import create_tunnel +import os +import pkg_resources +import requests +import socket +import sys +import threading +import time +import traceback +import urllib.request +from werkzeug.security import safe_join +from werkzeug.serving import make_server from gradio import encryptor from gradio import queue -from functools import wraps -import io -import inspect -import traceback -from werkzeug.security import safe_join - +from gradio.tunneling import create_tunnel # By default, the http server will try to open on port 7860. If not available, 7861, 7862, etc. INITIAL_PORT_VALUE = int(os.getenv('GRADIO_SERVER_PORT', "7860")) @@ -464,24 +462,13 @@ def start_server(interface, server_name=None, server_port=None, auth=None, ssl=N app.queue_thread.start() if interface.save_to is not None: interface.save_to["port"] = port - # app_kwargs = {"port": port, "host": server_name} - # if ssl: - # app_kwargs["ssl_context"] = ssl - # thread = threading.Thread(target=app.run, - # kwargs=app_kwargs, - # daemon=True) - # thread.start() - app_kwargs = {"app": app, "port": port, "host": server_name} if ssl: app_kwargs["ssl_context"] = ssl server = make_server(**app_kwargs) - def run_forever(): - server.serve_forever() - thread = threading.Thread(target=run_forever, daemon=True) + thread = threading.Thread(target=server.serve_forever, daemon=True) thread.start() return port, path_to_local_server, app, thread, server - # return port, path_to_local_server, app, thread def get_state(): return session.get("state") From 118315fe4bd52ea4cf21a40280dd1038b02efbe8 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 13:40:22 -0600 Subject: [PATCH 08/13] fixed tests; had to remove one from utils --- test/test_interfaces.py | 12 +++++++----- test/test_utils.py | 14 +------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/test/test_interfaces.py b/test/test_interfaces.py index 53d89e8551..84f684c0b3 100644 --- a/test/test_interfaces.py +++ b/test/test_interfaces.py @@ -10,6 +10,7 @@ import threading from comet_ml import Experiment import mlflow import wandb +import socket os.environ["GRADIO_ANALYTICS_ENABLED"] = "False" @@ -27,12 +28,13 @@ class TestInterface(unittest.TestCase): def test_close(self): io = Interface(lambda input: None, "textbox", "label") io.launch(prevent_thread_lock=True) - port1 = io.server_port + server_port = io.server_port io.close() - io = Interface(lambda input: None, "textbox", "label") - io.launch(prevent_thread_lock=True) - port2 = io.server_port - self.assertEquals(port1, port2) + time.sleep(1) + # check if port is free (if not, raises OSError) + s = socket.socket() # create a socket object + s.bind((networking.LOCALHOST_NAME, server_port)) + s.close() def test_close_all(self): interface = Interface(lambda input: None, "textbox", "label") diff --git a/test/test_utils.py b/test/test_utils.py index 9c83e8293d..2f2564b21a 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -101,20 +101,8 @@ class TestUtils(unittest.TestCase): readme_to_html("placeholder") def test_readme_to_html_correct_parse(self): - readme_to_html("https://github.com/gradio-app/gradio/blob/master/README.md") + readme_to_html("https://github.com/gradio-app/gradio/blob/master/README.md") - def test_launch_counter(self): - with tempfile.NamedTemporaryFile() as tmp: - with mock.patch('gradio.utils.JSON_PATH', tmp.name): - interface = gradio.Interface(lambda x: x, "textbox", "label") - os.remove(tmp.name) - interface.launch(prevent_thread_lock=True) - with open(tmp.name) as j: - self.assertEqual(json.load(j)['launches'], 1) - interface.launch(prevent_thread_lock=True) - with open(tmp.name) as j: - self.assertEqual(json.load(j)['launches'], 2) - if __name__ == '__main__': unittest.main() From 3d4306adca2d109fdf480853bf5f9b2a1fe675c6 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 14:20:43 -0600 Subject: [PATCH 09/13] fixed tests --- test/test_interfaces.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test_interfaces.py b/test/test_interfaces.py index 84f684c0b3..a82c5f3a36 100644 --- a/test/test_interfaces.py +++ b/test/test_interfaces.py @@ -27,15 +27,13 @@ def captured_output(): class TestInterface(unittest.TestCase): def test_close(self): io = Interface(lambda input: None, "textbox", "label") - io.launch(prevent_thread_lock=True) - server_port = io.server_port + _, local_url, _ = io.launch(prevent_thread_lock=True) + response = requests.get(local_url) + self.assertEqual(response.status_code, 200) io.close() - time.sleep(1) - # check if port is free (if not, raises OSError) - s = socket.socket() # create a socket object - s.bind((networking.LOCALHOST_NAME, server_port)) - s.close() - + with self.assertRaises(Exception): + response = requests.get(local_url) + def test_close_all(self): interface = Interface(lambda input: None, "textbox", "label") interface.close = mock.MagicMock() From 06acffa04249cc1ff1ef3d38b4f62b9a73643157 Mon Sep 17 00:00:00 2001 From: Un-index <68165727+Un-index@users.noreply.github.com> Date: Wed, 22 Dec 2021 00:09:30 +0300 Subject: [PATCH 10/13] Update interface.py remove duplicate entry --- gradio/interface.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gradio/interface.py b/gradio/interface.py index d2bb6ec983..d5e8f49eae 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -572,7 +572,6 @@ class Interface: show_error (bool): If True, any errors in the interface will be printed in the browser console log server_port (int): will start gradio app on this port (if available) server_name (str): to make app accessible on local network, set this to "0.0.0.0". - show_error (bool): show prediction errors in console show_tips (bool): if True, will occasionally show tips about new Gradio features enable_queue (bool): if True, inference requests will be served through a queue instead of with parallel threads. Required for longer inference times (> 1min) to prevent timeout. Returns: From 32aa8f196657e5609a51a4f7de143fedc0b7ffac Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 15:56:42 -0600 Subject: [PATCH 11/13] Update guides_template.html --- website/homepage/src/guides_template.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/website/homepage/src/guides_template.html b/website/homepage/src/guides_template.html index eb0ca21597..b935b17b26 100644 --- a/website/homepage/src/guides_template.html +++ b/website/homepage/src/guides_template.html @@ -7,19 +7,16 @@ Gradio - - - - - + + - + - - + + @@ -130,4 +127,4 @@ - \ No newline at end of file + From 9680ae66491d9422608f8317b96c9f1845b3d7c8 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 15:57:23 -0600 Subject: [PATCH 12/13] Update index_template.html --- website/homepage/src/index_template.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/homepage/src/index_template.html b/website/homepage/src/index_template.html index a547605ff8..c74d1e7006 100644 --- a/website/homepage/src/index_template.html +++ b/website/homepage/src/index_template.html @@ -7,9 +7,8 @@ Gradio - - + @@ -313,4 +312,4 @@ iface = gr.< - \ No newline at end of file + From 79a546bab9a0dd3f64c32258ee92c850196e90aa Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 21 Dec 2021 15:58:37 -0600 Subject: [PATCH 13/13] Update docs_template.html --- website/homepage/src/docs_template.html | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/website/homepage/src/docs_template.html b/website/homepage/src/docs_template.html index 829bb4e32a..e32bc55ed3 100644 --- a/website/homepage/src/docs_template.html +++ b/website/homepage/src/docs_template.html @@ -7,19 +7,16 @@ Gradio Docs - - - - - - + + + - + - - + +