Spaces:
Paused
Paused
File size: 298 Bytes
9c6ca6a |
1 2 3 4 5 6 7 8 9 10 11 |
from .registry import model_entrypoints
from .registry import is_model
def build_model(config, **kwargs):
model_name = config['MODEL']['NAME']
if not is_model(model_name):
raise ValueError(f'Unkown model: {model_name}')
return model_entrypoints(model_name)(config, **kwargs)
|