in docker_images/speechbrain/app/common.py [0:0]
def get_type(model_id, interface_type="speechbrain_interface"):
info = HfApi().model_info(repo_id=model_id)
if info.config:
if "speechbrain" in info.config:
if interface_type in info.config["speechbrain"]:
return ModelType(info.config["speechbrain"][interface_type].upper())
else:
raise ValueError(f"{interface_type} not in config.json")
else:
raise ValueError("speechbrain_interface not in config.json")
raise ValueError("no config.json in repository")