Download code/model/__init__.py from osamaifti/NEXTGPT: direct link, hf CLI and curl.
- Browser
- Download file 399 Bytes
-
https://huggingface.co/osamaifti/NEXTGPT/resolve/main/code/model/__init__.py
- Command line
-
hf download hf://osamaifti/NEXTGPT/code/model/__init__.py
-
curl -L -o __init__.py https://huggingface.co/osamaifti/NEXTGPT/resolve/main/code/model/__init__.py
399 Bytes
| import os.path | |
| from collections import OrderedDict | |
| from .agent import DeepSpeedAgent | |
| from .anyToImageVideoAudio import NextGPTModel | |
| import torch | |
| def load_model(args): | |
| agent_name = args['models'][args['model']]['agent_name'] | |
| model_name = args['models'][args['model']]['model_name'] | |
| model = globals()[model_name](**args) | |
| agent = globals()[agent_name](model, args) | |
| return agent | |