Spaces:
Runtime error
Runtime error
Download mGPT/models/build_model.py from OpenMotionLab/MotionGPT: direct link, hf CLI and curl.
- Browser
- Download file 325 Bytes
-
https://huggingface.co/spaces/OpenMotionLab/MotionGPT/resolve/main/mGPT/models/build_model.py
- Command line
-
hf download hf://spaces/OpenMotionLab/MotionGPT/mGPT/models/build_model.py
-
curl -L -o build_model.py https://huggingface.co/spaces/OpenMotionLab/MotionGPT/resolve/main/mGPT/models/build_model.py
325 Bytes
| from omegaconf import OmegaConf | |
| from mGPT.config import instantiate_from_config | |
| def build_model(cfg, datamodule): | |
| model_config = OmegaConf.to_container(cfg.model, resolve=True) | |
| model_config['params']['cfg'] = cfg | |
| model_config['params']['datamodule'] = datamodule | |
| return instantiate_from_config(model_config) | |