Download plugins/core.py from ko2009/docker: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/ko2009/docker/resolve/main/plugins/core.py
- Command line
-
hf download hf://spaces/ko2009/docker/plugins/core.py
-
curl -L -o core.py https://huggingface.co/spaces/ko2009/docker/resolve/main/plugins/core.py
775 Bytes
| # Core plugin | |
| # author: Vladislav Janvarev | |
| from chain_img_processor import ChainImgProcessor | |
| # start function | |
| def start(core:ChainImgProcessor): | |
| manifest = { | |
| "name": "Core plugin", | |
| "version": "2.0", | |
| "default_options": { | |
| "default_chain": "faceswap", # default chain to run | |
| "init_on_start": "faceswap,txt2clip,gfpgan,codeformer", # init these processors on start | |
| "is_demo_row_render": False, | |
| }, | |
| } | |
| return manifest | |
| def start_with_options(core:ChainImgProcessor, manifest:dict): | |
| options = manifest["options"] | |
| core.default_chain = options["default_chain"] | |
| core.init_on_start = options["init_on_start"] | |
| core.is_demo_row_render= options["is_demo_row_render"] | |
| return manifest | |