import json
import uuid
import random

class Config:
    def __init__(self, config_file: str):
        with open(config_file, 'r', encoding='utf-8') as f:
            config = json.load(f)
            self.uploaded_image = {}
            self.server_address = config.get('server_address', '127.0.0.1:8188')
            self.workflowfile = config.get('workflowfile', '')
            self.output_dir = config.get('output_dir', '')
            self.client_id = str(uuid.uuid4())
            self.idx = 1
            self.seed = random.randint(1, 10000)


if __name__ == "__main__":
    config = Config("config/workflow_config.json")
    print(config.server_address)
    print(config.workflowfile)
    print(config.output_dir)
    print(config.client_id)
    print(config.idx)
    print(config.seed)
