Spaces:
Runtime error
Runtime error
| """ | |
| Layout generator abstract interface | |
| Define standard process for layout generation | |
| """ | |
| from abc import ABC, abstractmethod | |
| from pathlib import Path | |
| from typing import Optional | |
| class LayoutGenerator(ABC): | |
| """Layout generator base class""" | |
| def generate( | |
| self, | |
| config_path: Path, | |
| output_dir: Path, | |
| seed: int = 0 | |
| ) -> Path: | |
| """ | |
| Generate layout | |
| Args: | |
| config_path: Configuration file path | |
| output_dir: Output directory | |
| seed: Random seed | |
| Returns: | |
| Generated .blend file path | |
| """ | |
| pass | |
| def validate_config(self, config_path: Path) -> bool: | |
| """Validate if configuration file is valid""" | |
| pass | |
| class GenerationError(Exception): | |
| """Layout generation error""" | |
| pass | |