Spaces:
Runtime error
Runtime error
fix
Browse files
AICoreAGIX_with_TB.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "0"
|
3 |
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # Prevent TensorFlow from trying to use CUDAimport os # Make sure this is near the top of your file
|
4 |
import base64
|
5 |
import secrets
|
@@ -42,10 +42,6 @@ from autonomy_engine import AutonomyEngine
|
|
42 |
from codette_bridge import CodetteBridge
|
43 |
|
44 |
|
45 |
-
import os # Make sure this is near the top of your file
|
46 |
-
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # Prevent TensorFlow from trying to use CUDA
|
47 |
-
|
48 |
-
|
49 |
class AICoreAGIX:
|
50 |
def __init__(self, config_path: str = "config.json"):
|
51 |
self.self_trust_core = SelfTrustCore()
|
@@ -110,7 +106,7 @@ class AICoreAGIX:
|
|
110 |
except Exception as e2:
|
111 |
logger.warning(f"[Tokenizer Load]: Full fallback to gpt2 failed: {e2}")
|
112 |
try:
|
113 |
-
return AutoTokenizer.from_pretrained("gpt2", local_files_only=
|
114 |
except Exception as e3:
|
115 |
logger.error(f"[Tokenizer Load]: Even fallback to GPT2 failed: {e3}")
|
116 |
raise RuntimeError("Tokenizer load completely failed.")
|
@@ -126,36 +122,6 @@ class AICoreAGIX:
|
|
126 |
return AutoModelForCausalLM.from_pretrained("gpt2")
|
127 |
|
128 |
|
129 |
-
self.context_memory = self._initialize_vector_memory()
|
130 |
-
self.http_session = aiohttp.ClientSession()
|
131 |
-
self.database = Database()
|
132 |
-
self.multi_agent_system = MultiAgentSystem()
|
133 |
-
self.self_improving_ai = SelfImprovingAI()
|
134 |
-
self.neural_symbolic_engine = NeuroSymbolicEngine()
|
135 |
-
self.federated_ai = FederatedAI()
|
136 |
-
self.ethics_core = EthicsCore()
|
137 |
-
self.autonomy = AutonomyEngine()
|
138 |
-
self.codette_bridge = CodetteBridge(model_id="ft:gpt-4o-2024-08-06:raiffs-bits:pidette:B9TL")
|
139 |
-
|
140 |
-
self._codriao_key = self._generate_codriao_key()
|
141 |
-
self._fernet_key = Fernet.generate_key()
|
142 |
-
self._encrypted_codriao_key = Fernet(self._fernet_key).encrypt(self._codriao_key.encode())
|
143 |
-
self._codriao_journal = []
|
144 |
-
self._journal_key = Fernet.generate_key()
|
145 |
-
self._journal_fernet = Fernet(self._journal_key)
|
146 |
-
|
147 |
-
self._encryption_key = Fernet.generate_key()
|
148 |
-
secure_memory_module = load_secure_memory_module()
|
149 |
-
SecureMemorySession = secure_memory_module.SecureMemorySession
|
150 |
-
self.secure_memory_loader = SecureMemorySession(self._encryption_key)
|
151 |
-
|
152 |
-
self.speech_engine = pyttsx3.init()
|
153 |
-
self.health_module = CodriaoHealthModule(ai_core=self)
|
154 |
-
self.training_memory = []
|
155 |
-
self.quarantine_engine = QuarantineEngine()
|
156 |
-
self.anomaly_scorer = AnomalyScorer()
|
157 |
-
self.lockdown_engaged = False
|
158 |
-
|
159 |
logger.info("[Codriao]: SelfTrustCore initialized. Fear is now filtered by self-consent.")
|
160 |
|
161 |
def _load_config(self, config_path: str) -> dict:
|
|
|
1 |
import os
|
2 |
+
# os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "0"
|
3 |
os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # Prevent TensorFlow from trying to use CUDAimport os # Make sure this is near the top of your file
|
4 |
import base64
|
5 |
import secrets
|
|
|
42 |
from codette_bridge import CodetteBridge
|
43 |
|
44 |
|
|
|
|
|
|
|
|
|
45 |
class AICoreAGIX:
|
46 |
def __init__(self, config_path: str = "config.json"):
|
47 |
self.self_trust_core = SelfTrustCore()
|
|
|
106 |
except Exception as e2:
|
107 |
logger.warning(f"[Tokenizer Load]: Full fallback to gpt2 failed: {e2}")
|
108 |
try:
|
109 |
+
return AutoTokenizer.from_pretrained("gpt2", local_files_only=False)
|
110 |
except Exception as e3:
|
111 |
logger.error(f"[Tokenizer Load]: Even fallback to GPT2 failed: {e3}")
|
112 |
raise RuntimeError("Tokenizer load completely failed.")
|
|
|
122 |
return AutoModelForCausalLM.from_pretrained("gpt2")
|
123 |
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
logger.info("[Codriao]: SelfTrustCore initialized. Fear is now filtered by self-consent.")
|
126 |
|
127 |
def _load_config(self, config_path: str) -> dict:
|
__pycache__/AICoreAGIX_with_TB.cpython-311.pyc
CHANGED
Binary files a/__pycache__/AICoreAGIX_with_TB.cpython-311.pyc and b/__pycache__/AICoreAGIX_with_TB.cpython-311.pyc differ
|
|