Spaces:
Build error
Build error
Update app.py
Browse files739 unmodified lines74074174274374474574674718 unmodified lines766767768769770771739 unmodified linesclass GDesigner:"""Graph-based Designer for Multi-agent Communication"""def __init__(self, num_agents, input_dim=768):self.num_agents = num_agentsself.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')# Initialize components18 unmodified lines# Task-specific componentsself.task_embeddings = {}self.anchor_topologies = {}def _initialize_graph(self):"""Initialize the communication graph with basic structure."""739 unmodified lines74074174274374474574674774818 unmodified lines767768769770771772773774775776777778739 unmodified linesclass GDesigner:"""Graph-based Designer for Multi-agent Communication"""def __init__(self, num_agents=3, input_dim=768, roles=None):self.num_agents = num_agentsself.roles = roles if roles else {}self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')# Initialize components18 unmodified lines# Task-specific componentsself.task_embeddings = {}self.anchor_topologies = {}def update_roles(self, new_roles):"""Update agent roles dynamically"""self.roles = new_rolesself.num_agents = len(new_roles)self.communication_graph = self._initialize_graph()def _initialize_graph(self):"""Initialize the communication graph with basic structure."""
app.py+8-1