File size: 1,069 Bytes
dd850a7
 
 
 
 
 
ba66953
dd850a7
 
 
 
96f06d9
dd850a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from dataclasses import dataclass
from typing import Optional

@dataclass
class Config:
    # Model settings
    DEFAULT_MODEL: str = "HuggingFaceTB/SmolLM2-135M-Instruct"
    DEVICE: str = "cpu"  # Force CPU usage
    
    # Generation settings
    DEFAULT_MAX_TOKENS: int = 20
    DEFAULT_PROMPT: str = "The old wizard dropped his staff when the wind howled, and it rolled into the dark cave"
    DEFAULT_TEMPERATURE: float = 0.7
    DEFAULT_TOP_P: float = 0.95
    
    # Visualization settings
    DEFAULT_THRESHOLD: float = 0.05
    MIN_LINE_WIDTH: float = 0.5
    MAX_LINE_WIDTH: float = 3.0
    
    # Colors
    INPUT_COLOR: str = "skyblue"
    OUTPUT_COLOR: str = "coral"
    CONNECTION_COLOR: str = "rgba(128, 128, 128, 0.3)"
    
    # Cache settings
    CACHE_SIZE: int = 10  # Number of generations to cache
    
    # UI settings
    PLOT_WIDTH: int = 1000
    PLOT_HEIGHT: int = 600
    
    # Node settings
    NODE_SIZE: int = 15
    NODE_LINE_WIDTH: float = 2
    
    # Font settings
    FONT_SIZE: int = 10
    FONT_FAMILY: str = "Arial, sans-serif"