File size: 502 Bytes
70f8d75
 
 
 
 
54b77be
 
 
 
 
c227032
54b77be
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from dataclasses import dataclass
from typing import Optional

@dataclass
class EnvironmentConfig:
    def __init__(self):
        self.device = "cuda"  # or "cpu"
        self.log_level = "INFO"
        self.api_port = 8000
        self.threads = 4

    def to_dict(self):
        """Convert config to dictionary format"""
        return {
            "device": self.device,
            "log_level": self.log_level,
            "api_port": self.api_port,
            "threads": self.threads
        }