Spaces:
Paused
Paused
Download extensions/example/__init__.py from StaticExposure/ai-toolkit: direct link, hf CLI and curl.
- Browser
- Download file 859 Bytes
-
https://huggingface.co/spaces/StaticExposure/ai-toolkit/resolve/main/extensions/example/__init__.py
- Command line
-
hf download hf://spaces/StaticExposure/ai-toolkit/extensions/example/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/StaticExposure/ai-toolkit/resolve/main/extensions/example/__init__.py
859 Bytes
| # This is an example extension for custom training. It is great for experimenting with new ideas. | |
| from toolkit.extension import Extension | |
| # We make a subclass of Extension | |
| class ExampleMergeExtension(Extension): | |
| # uid must be unique, it is how the extension is identified | |
| uid = "example_merge_extension" | |
| # name is the name of the extension for printing | |
| name = "Example Merge Extension" | |
| # This is where your process class is loaded | |
| # keep your imports in here so they don't slow down the rest of the program | |
| def get_process(cls): | |
| # import your process class here so it is only loaded when needed and return it | |
| from .ExampleMergeModels import ExampleMergeModels | |
| return ExampleMergeModels | |
| AI_TOOLKIT_EXTENSIONS = [ | |
| # you can put a list of extensions here | |
| ExampleMergeExtension | |
| ] | |