Add /v1/internal/model/load endpoint (tentative)

This commit is contained in:
oobabooga 2023-11-07 20:58:06 -08:00
parent 43c53a7820
commit 2358706453
5 changed files with 47 additions and 4 deletions

View file

@ -79,7 +79,7 @@ def load_model(model_name, loader=None):
loader = metadata['loader']
if loader is None:
logger.error('The path to the model does not exist. Exiting.')
return None, None
raise ValueError
shared.args.loader = loader
output = load_func_map[loader](model_name)