From e0fcfdc9fde87fe6a8943d63aad7042fc7e25a11 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 8 Dec 2020 08:04:29 -0600 Subject: [PATCH] updated PyPi version --- gradio.egg-info/PKG-INFO | 2 +- gradio.egg-info/SOURCES.txt | 1 + gradio.egg-info/requires.txt | 4 ++-- gradio/interface.py | 5 +++-- gradio/static/js/gradio.js | 7 +++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gradio.egg-info/PKG-INFO b/gradio.egg-info/PKG-INFO index 59a9c73ffb..7c34fed6a4 100644 --- a/gradio.egg-info/PKG-INFO +++ b/gradio.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: gradio -Version: 1.3.1 +Version: 1.3.2 Summary: Python library for easily interacting with trained machine learning models Home-page: https://github.com/gradio-app/gradio-UI Author: Abubakar Abid diff --git a/gradio.egg-info/SOURCES.txt b/gradio.egg-info/SOURCES.txt index 42aa2ee329..6ac693a4ae 100644 --- a/gradio.egg-info/SOURCES.txt +++ b/gradio.egg-info/SOURCES.txt @@ -7,6 +7,7 @@ gradio/embeddings.py gradio/inputs.py gradio/interface.py gradio/interpretation.py +gradio/launches.json gradio/networking.py gradio/notebook.py gradio/outputs.py diff --git a/gradio.egg-info/requires.txt b/gradio.egg-info/requires.txt index 9f5cdbae5c..91b95b5c5c 100644 --- a/gradio.egg-info/requires.txt +++ b/gradio.egg-info/requires.txt @@ -1,7 +1,7 @@ numpy requests -Flask==1.1.1 -Flask-Cors==3.0.8 +Flask>=1.1.1 +Flask-Cors>=3.0.8 flask-cachebuster paramiko scipy diff --git a/gradio/interface.py b/gradio/interface.py index f37ae67f1e..bf4b12d96e 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -49,7 +49,7 @@ class Interface: title=None, description=None, article=None, thumbnail=None, server_port=None, server_name=networking.LOCALHOST_NAME, allow_screenshot=True, allow_flagging=True, - embedding="default", flagging_dir="flagged", analytics_enabled=True): + embedding=None, flagging_dir="flagged", analytics_enabled=True): """ Parameters: @@ -199,7 +199,8 @@ class Interface: "thumbnail": self.thumbnail, "allow_screenshot": self.allow_screenshot, "allow_flagging": self.allow_flagging, - "allow_interpretation": self.interpretation is not None + "allow_interpretation": self.interpretation is not None, + "allow_embedding": self.embedding is not None, } try: param_names = inspect.getfullargspec(self.predict[0])[0] diff --git a/gradio/static/js/gradio.js b/gradio/static/js/gradio.js index 94bd8f838e..1a76bf1048 100644 --- a/gradio/static/js/gradio.js +++ b/gradio/static/js/gradio.js @@ -51,8 +51,8 @@ function gradio(config, fn, target, example_file_path) { - - + + @@ -200,6 +200,9 @@ function gradio(config, fn, target, example_file_path) { } target.find(".clear").click(clear_all); + if (!config["allow_embedding"]) { + target.find(".embedding").css("visibility", "hidden"); + } if (!config["allow_screenshot"] && !config["allow_flagging"] && !config["allow_interpretation"]) { target.find(".screenshot, .record, .flag, .interpret").css("visibility", "hidden"); } else {