From 245ec0f75fc446e0b28a3c1b229d480c0e907e30 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Wed, 12 Jan 2022 14:12:18 -0600 Subject: [PATCH] fixed loading from Spaces --- gradio/external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio/external.py b/gradio/external.py index 89630a00fc..a86786df8a 100644 --- a/gradio/external.py +++ b/gradio/external.py @@ -211,7 +211,7 @@ def get_spaces_interface(model_name, api_key, alias): headers = {'Content-Type': 'application/json'} r = requests.get(iframe_url) - result = re.search('window.config =(.*?);\n', r.text) # some basic regex to extract the config + result = re.search('window.gradio_config = (.*?);', r.text) # some basic regex to extract the config config = json.loads(result.group(1)) interface_info = interface_params_from_config(config)