diff --git a/gradio/external.py b/gradio/external.py index e5e7947864..f6d5fcfd8b 100644 --- a/gradio/external.py +++ b/gradio/external.py @@ -126,9 +126,12 @@ def get_gradio_interface(model_name, api_key): return interface_info -def load_interface(model, src, api_key=None, verbose=True): +def load_interface(name, src=None, api_key=None, verbose=True): + if src is None: + src, name = name.split("/") + assert src.lower() in repos, "parameter: src must be one of {}".format(repos.keys()) - interface_info = repos[src](model, api_key) + interface_info = repos[src](name, api_key) return Interface(**interface_info) repos = {