Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download main.py from SMSD75/SynthScope: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/spaces/SMSD75/SynthScope/resolve/main/main.py
- Command line
-
hf download hf://spaces/SMSD75/SynthScope/main.py
-
curl -L -o main.py https://huggingface.co/spaces/SMSD75/SynthScope/resolve/main/main.py
490 Bytes
| import hydra | |
| from accelerate.utils import set_seed | |
| from omegaconf import DictConfig | |
| from dataset import AIGIDatasetModule | |
| from trainer import SynthScopeModelTrainer | |
| def main(cfg: DictConfig) -> None: | |
| set_seed(getattr(cfg.TrainerConfig, "seed", 42)) | |
| dataset_module = AIGIDatasetModule(cfg) | |
| trainer = SynthScopeModelTrainer(cfg, dataset_module) | |
| trainer.train() | |
| if __name__ == "__main__": | |
| main() | |