Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,9 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
|
| 14 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../..'))
|
| 15 |
|
| 16 |
try:
|
| 17 |
-
from
|
| 18 |
-
from
|
| 19 |
-
from
|
| 20 |
from components.search_engine import SearchEngine
|
| 21 |
except ImportError:
|
| 22 |
# Fallback for container environment
|
|
@@ -100,7 +100,13 @@ try:
|
|
| 100 |
|
| 101 |
# Set up AI core with cocoon data
|
| 102 |
ai_core.cocoon_manager = cocoon_manager
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
logger.info(
|
| 105 |
f"Loaded {len(cocoon_manager.cocoon_data)} existing cocoons "
|
| 106 |
f"with quantum coherence {ai_core.quantum_state.get('coherence', 0.5)}"
|
|
|
|
| 14 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../..'))
|
| 15 |
|
| 16 |
try:
|
| 17 |
+
from components.ai_core import AICore
|
| 18 |
+
from components.aegis_integration import AegisBridge
|
| 19 |
+
from components.aegis_integration.config import AEGIS_CONFIG
|
| 20 |
from components.search_engine import SearchEngine
|
| 21 |
except ImportError:
|
| 22 |
# Fallback for container environment
|
|
|
|
| 100 |
|
| 101 |
# Set up AI core with cocoon data
|
| 102 |
ai_core.cocoon_manager = cocoon_manager
|
| 103 |
+
quantum_state = cocoon_manager.get_latest_quantum_state()
|
| 104 |
+
# Ensure quantum_state is always a proper dict
|
| 105 |
+
if isinstance(quantum_state, dict):
|
| 106 |
+
ai_core.quantum_state = quantum_state
|
| 107 |
+
else:
|
| 108 |
+
ai_core.quantum_state = {"coherence": 0.5}
|
| 109 |
+
|
| 110 |
logger.info(
|
| 111 |
f"Loaded {len(cocoon_manager.cocoon_data)} existing cocoons "
|
| 112 |
f"with quantum coherence {ai_core.quantum_state.get('coherence', 0.5)}"
|