From 440991cb1c84236fee258e053ac3931cd4b39ba3 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 3 Mar 2022 15:11:58 -0500 Subject: [PATCH] move is_space to launch() to allow blocks to launch() --- gradio/interface.py | 1 - gradio/launchable.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio/interface.py b/gradio/interface.py index 09756afc84..aa5a8a5732 100644 --- a/gradio/interface.py +++ b/gradio/interface.py @@ -280,7 +280,6 @@ class Interface(Launchable): self.thumbnail = thumbnail theme = theme if theme is not None else os.getenv("GRADIO_THEME", "default") - self.is_space = True if os.getenv("SYSTEM") == "spaces" else False DEPRECATED_THEME_MAP = { "darkdefault": "default", "darkhuggingface": "dark-huggingface", diff --git a/gradio/launchable.py b/gradio/launchable.py index 10e6e8fd2d..c10ff5f217 100644 --- a/gradio/launchable.py +++ b/gradio/launchable.py @@ -88,6 +88,7 @@ class Launchable: self.height = height self.width = width self.favicon_path = favicon_path + self.is_space = True if os.getenv("SYSTEM") == "spaces" else False if hasattr(self, "encrypt") and self.encrypt is None: self.encrypt = encrypt