Spaces:
Sleeping
Sleeping
Download lagent/utils/package.py from shinelover/InternLM_Lagent: direct link, hf CLI and curl.
- Browser
- Download file 179 Bytes
-
https://huggingface.co/spaces/shinelover/InternLM_Lagent/resolve/main/lagent/utils/package.py
- Command line
-
hf download hf://spaces/shinelover/InternLM_Lagent/lagent/utils/package.py
-
curl -L -o package.py https://huggingface.co/spaces/shinelover/InternLM_Lagent/resolve/main/lagent/utils/package.py
179 Bytes
| from importlib.util import find_spec | |
| def is_module_exist(module_name): | |
| spec = find_spec(module_name) | |
| if spec is None: | |
| return False | |
| else: | |
| return True | |