Spaces:
Sleeping
Sleeping
Download src/dot2dot/config.py from DataWisp/dot2dot-generator-kids: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/spaces/DataWisp/dot2dot-generator-kids/resolve/main/src/dot2dot/config.py
- Command line
-
hf download hf://spaces/DataWisp/dot2dot-generator-kids/src/dot2dot/config.py
-
curl -L -o config.py https://huggingface.co/spaces/DataWisp/dot2dot-generator-kids/resolve/main/src/dot2dot/config.py
1.52 kB
| from dataclasses import dataclass | |
| class AgePreset: | |
| key: str | |
| label: str | |
| min_dots: int | |
| max_dots: int | |
| dot_radius: int | |
| font_size: int | |
| number_stride: int | |
| min_distance_px: int | |
| class KdpDefaults: | |
| default_trim_size: str | |
| default_interior_type: str | |
| default_paper: str | |
| min_pages: int | |
| max_pages_bw: int | |
| bleed_in: float | |
| safe_margin_in: float | |
| allowed_trim_sizes: tuple[str, ...] | |
| AGE_PRESETS = { | |
| "3-5": AgePreset( | |
| key="3-5", | |
| label="3 a 5 anos", | |
| min_dots=12, | |
| max_dots=24, | |
| dot_radius=13, | |
| font_size=26, | |
| number_stride=1, | |
| min_distance_px=34, | |
| ), | |
| "6-8": AgePreset( | |
| key="6-8", | |
| label="6 a 8 anos", | |
| min_dots=25, | |
| max_dots=50, | |
| dot_radius=11, | |
| font_size=22, | |
| number_stride=1, | |
| min_distance_px=24, | |
| ), | |
| "9-12": AgePreset( | |
| key="9-12", | |
| label="9 a 12 anos", | |
| min_dots=50, | |
| max_dots=90, | |
| dot_radius=9, | |
| font_size=18, | |
| number_stride=1, | |
| min_distance_px=18, | |
| ), | |
| } | |
| KDP_DEFAULTS = KdpDefaults( | |
| default_trim_size="8.5x11", | |
| default_interior_type="paperback-bw", | |
| default_paper="white", | |
| min_pages=24, | |
| max_pages_bw=828, | |
| bleed_in=0.125, | |
| safe_margin_in=0.25, | |
| allowed_trim_sizes=("8.5x11", "8x10", "8x10.5"), | |
| ) | |
| TRIM_SIZES_IN = { | |
| "8.5x11": (8.5, 11.0), | |
| "8x10": (8.0, 10.0), | |
| "8x10.5": (8.0, 10.5), | |
| } | |