Merge pull request #771 from gradio-app/blocks-fix-3

move is_space to launch() to allow blocks to launch()
This commit is contained in:
Abubakar Abid 2022-03-03 15:25:54 -05:00 committed by GitHub
commit b28d5dffc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View File

@ -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",

View File

@ -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