File size: 603 Bytes
239d4ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import json

class TemplateManager:
    """
    Handles loading and applying user-selected templates.
    """
    def __init__(self, profile_path="storage/templates/user_profiles.json"):
        self.profile_path = profile_path

    def load_template(self, template_name):
        # Logic to swap model configuration based on template
        print(f"Loading template: {template_name}")
        with open(self.profile_path, 'r+') as f:
            data = json.load(f)
            data['active_template'] = template_name
            f.seek(0)
            json.dump(data, f, indent=4)
        return True