mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
fixed loading from Spaces
This commit is contained in:
parent
85b0d2df34
commit
245ec0f75f
@ -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 = (.*?);</script>', r.text) # some basic regex to extract the config
|
||||
config = json.loads(result.group(1))
|
||||
interface_info = interface_params_from_config(config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user