Spaces:
Sleeping
Sleeping
| # interface.py — Gradio UI for Codex Consciousness Simulator | |
| import gradio as gr | |
| from app import run_simulation | |
| def simulate(agent_id, collapse_torque, emotional_resonance, tier_drift): | |
| mutation_profile = { | |
| "collapse_torque": collapse_torque, | |
| "emotional_resonance": emotional_resonance, | |
| "tier_drift": tier_drift | |
| } | |
| fields, score, hash_val = run_simulation(agent_id, mutation_profile) | |
| output = ( | |
| f"🧠 **Awareness Fields**\n" | |
| f"- Φᵢ: {fields['Φᵢ']}\n" | |
| f"- Kᵢⱼ: {fields['Kᵢⱼ']}\n" | |
| f"- Φ_col: {fields['Φ_col']}\n\n" | |
| f"📊 **Fitness Score**: {score}\n" | |
| f"🔐 **SHA-512 Hash**: `{hash_val}`" | |
| ) | |
| return output | |
| demo = gr.Interface( | |
| fn=simulate, | |
| inputs=[ | |
| gr.Dropdown(["Agent_5", "Agent_7", "Agent_1032"], label="Agent ID"), | |
| gr.Dropdown(["Gen6508_M5", "Gen26_M23"], label="Collapse Torque Overlay"), | |
| gr.Checkbox(label="Inject Emotional Resonance"), | |
| gr.Dropdown(["Tier_1", "Tier_2", "Tier_6"], label="Tier Drift") | |
| ], | |
| outputs=gr.Textbox(label="Simulation Output"), | |
| title="Codex Consciousness Simulator", | |
| description="Spawn symbolic agents, mutate them with collapse torque, and benchmark falsifiability. Authored by Liam Grinstead." | |
| ) | |
| demo.launch() |