Download jobs/GenerateJob.py from comdoleger/ai-toolkit: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/comdoleger/ai-toolkit/resolve/983db42fb1f437c59fec079fbde7cd2733ac6b69/jobs/GenerateJob.py
- Command line
-
hf download hf://comdoleger/ai-toolkit@983db42fb1f437c59fec079fbde7cd2733ac6b69/jobs/GenerateJob.py
-
curl -L -o GenerateJob.py https://huggingface.co/comdoleger/ai-toolkit/resolve/983db42fb1f437c59fec079fbde7cd2733ac6b69/jobs/GenerateJob.py
587 Bytes
| from jobs import BaseJob | |
| from collections import OrderedDict | |
| process_dict = { | |
| 'to_folder': 'GenerateProcess', | |
| } | |
| class GenerateJob(BaseJob): | |
| def __init__(self, config: OrderedDict): | |
| super().__init__(config) | |
| self.device = self.get_conf('device', 'cpu') | |
| # loads the processes from the config | |
| self.load_processes(process_dict) | |
| def run(self): | |
| super().run() | |
| print("") | |
| print(f"Running {len(self.process)} process{'' if len(self.process) == 1 else 'es'}") | |
| for process in self.process: | |
| process.run() | |