from dataset import PasswordTesterDataset import torch import json class DualityAI: def __init__(self, config_path): with open(config_path) as f: self.config = json.load(f) self.dataset = PasswordTesterDataset( self.config['safetensors_file'], self.config['tokenizer_file'] ) def interact(self, index=0): # BODY (raw tensor) body = self.dataset[index] # MIND (analytical view) mind = body.float() / 255.0 return {'BODY': body, 'MIND': mind} # Example usage if __name__ == "__main__": ai = DualityAI("config.json") result = ai.interact(0) print("BODY tensor:", result['BODY']) print("MIND tensor:", result['MIND'])