hong_seungbum
add application file
c7f5de3
raw
history blame
274 Bytes
import importlib
def load_transformers(name: str, model_pretrain: str):
model_module = importlib.import_module(f"models.{name}")
model_class = getattr(model_module, name)
model_instance = model_class(model_pretrain=model_pretrain)
return model_instance