Spaces:
Build error
Build error
Download datasets/visual_sampler/__init__.py from Leyogho/Core-AI-IMAGE: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/Leyogho/Core-AI-IMAGE/resolve/main/datasets/visual_sampler/__init__.py
- Command line
-
hf download hf://spaces/Leyogho/Core-AI-IMAGE/datasets/visual_sampler/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Leyogho/Core-AI-IMAGE/resolve/main/datasets/visual_sampler/__init__.py
409 Bytes
| from .sampler import ShapeSampler | |
| from .simpleclick_sampler import SimpleClickSampler | |
| def build_shape_sampler(cfg, **kwargs): | |
| sampler_name = cfg['STROKE_SAMPLER']['EVAL']['MODE'] | |
| if sampler_name == 'random': | |
| return ShapeSampler(cfg, **kwargs) | |
| elif sampler_name in ['best', 'best_random']: | |
| return SimpleClickSampler(cfg, **kwargs) | |
| else: | |
| assert False, "not implemented" |