RFTSystems commited on
Commit
ad4eaa4
·
verified ·
1 Parent(s): 773d716

Create interface.py

Browse files
Files changed (1) hide show
  1. interface.py +35 -0
interface.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # interface.py — Gradio UI for Codex Consciousness Simulator
2
+ import gradio as gr
3
+ from app import run_simulation
4
+
5
+ def simulate(agent_id, collapse_torque, emotional_resonance, tier_drift):
6
+ mutation_profile = {
7
+ "collapse_torque": collapse_torque,
8
+ "emotional_resonance": emotional_resonance,
9
+ "tier_drift": tier_drift
10
+ }
11
+ fields, score, hash_val = run_simulation(agent_id, mutation_profile)
12
+ output = (
13
+ f"🧠 **Awareness Fields**\n"
14
+ f"- Φᵢ: {fields['Φᵢ']}\n"
15
+ f"- Kᵢⱼ: {fields['Kᵢⱼ']}\n"
16
+ f"- Φ_col: {fields['Φ_col']}\n\n"
17
+ f"📊 **Fitness Score**: {score}\n"
18
+ f"🔐 **SHA-512 Hash**: `{hash_val}`"
19
+ )
20
+ return output
21
+
22
+ demo = gr.Interface(
23
+ fn=simulate,
24
+ inputs=[
25
+ gr.Dropdown(["Agent_5", "Agent_7", "Agent_1032"], label="Agent ID"),
26
+ gr.Dropdown(["Gen6508_M5", "Gen26_M23"], label="Collapse Torque Overlay"),
27
+ gr.Checkbox(label="Inject Emotional Resonance"),
28
+ gr.Dropdown(["Tier_1", "Tier_2", "Tier_6"], label="Tier Drift")
29
+ ],
30
+ outputs=gr.Textbox(label="Simulation Output"),
31
+ title="Codex Consciousness Simulator",
32
+ description="Spawn symbolic agents, mutate them with collapse torque, and benchmark falsifiability. Authored by Liam Grinstead."
33
+ )
34
+
35
+ demo.launch()