FSI_FELON / space_app.py
FerrellSyntheticIntelligence's picture
Upload space_app.py with huggingface_hub
0990afd verified
Raw
History Blame Contribute Delete
2.68 kB
#!/usr/bin/env python3
"""
FSI_FELON v4.0 — Standalone Demo (no server required)
Run: python3 space_app.py
"""
import sys, os, json, time
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
def demo():
print("\n" + "═"*60)
print(" ⚡ FSI_FELON v4.0 — Standalone Demo")
print(" Ferrell Synthetic Intelligence")
print("═"*60)
# Chimera Engine
print("\n🧬 Chimera Engine")
try:
from chimera.engine import ChimeraEngine
ce = ChimeraEngine()
r = ce.route("build a web app with authentication")
print(f" Routed to: {r['routed_to']} (score: {r['routing_score']})")
for organ, score in sorted(r['all_scores'].items(), key=lambda x: -x[1])[:3]:
print(f" {organ:15s}: {score}")
except Exception as e:
print(f" ✗ Error: {e}")
# Mesh P2P
print("\n🌐 Mesh P2P Network")
try:
import tempfile
from mesh_repo import MeshRepo
td = tempfile.mkdtemp()
mr = MeshRepo(td)
result = mr.init("demo_node")
print(f" Init: {'✓' if result.get('success') else '✗'}")
print(f" Path: {result.get('path', '?')}")
except Exception as e:
print(f" ✗ Error: {e}")
# Sandbox
print("\n🛡️ Execution Sandbox")
try:
from fsi_sandbox import ExecutionSandbox
s = ExecutionSandbox()
r = s.execute_and_verify("print('hello from FSI_FELON')")
print(f" Success: {r['success']}")
print(f" Output: {r.get('stdout', '').strip()}")
except Exception as e:
print(f" ✗ Error: {e}")
# White Rabbit — Deep Truth-Seeking (not general chat, not default)
print("\n🐇 White Rabbit — Truth Investigation Mode")
try:
from rabbit import WhiteRabbit
wr = WhiteRabbit()
r = wr.investigate("what really happened")
print(f" {r[:80]}...")
except Exception as e:
print(f" ✗ Error: {e}")
# Superimposition
print("\n🔄 Superimposition Engine")
try:
from chimera.superimposition import SuperimpositionEngine
si = SuperimpositionEngine()
variants = si.generate_variants("fastapi backend", 5)
for v in variants:
print(f" [{v['id']}] {v['approach']:14s}{v['organ']:8s} ({len(v['code'])} chars)")
except Exception as e:
print(f" ✗ Error: {e}")
print("\n" + "═"*60)
print(" ✅ All systems operational")
print(" ▶ Start the full IDE: python3 ide/server.py")
print(" ▶ Open http://localhost:9090")
print("═"*60 + "\n")
if __name__ == "__main__":
demo()