Spaces:
Running
on
Zero
Running
on
Zero
| import importlib | |
| from tgs.utils.typing import * | |
| def find(cls_string) -> Type: | |
| module_string = ".".join(cls_string.split(".")[:-1]) | |
| cls_name = cls_string.split(".")[-1] | |
| module = importlib.import_module(module_string, package=None) | |
| cls = getattr(module, cls_name) | |
| return cls |