Spaces:
Sleeping
Sleeping
Update interface.py
Browse files- interface.py +21 -13
interface.py
CHANGED
|
@@ -8,27 +8,35 @@ def simulate(agent_id, collapse_torque, emotional_resonance, tier_drift):
|
|
| 8 |
mutation_profile = build_mutation(agent_id, collapse_torque, tier_drift, emotional_resonance)
|
| 9 |
fields, score, hash_val = run_simulation(agent_id, mutation_profile)
|
| 10 |
append_to_registry(agent_id, collapse_torque, tier_drift, emotional_resonance, score, hash_val)
|
| 11 |
-
|
| 12 |
-
f"
|
| 13 |
-
f"-
|
| 14 |
-
f"- Kᵢⱼ: {fields['Kᵢⱼ']}\n"
|
| 15 |
-
f"- Φ_col: {fields['Φ_col']}\n\n"
|
| 16 |
-
f"📊 **Fitness Score**: {score}\n"
|
| 17 |
-
f"🔐 **SHA-512 Hash**: `{hash_val}`"
|
| 18 |
)
|
|
|
|
| 19 |
|
| 20 |
with gr.Blocks() as demo:
|
| 21 |
gr.Markdown("# 🧠 Codex Consciousness Simulator")
|
| 22 |
gr.Markdown("Spawn symbolic agents, mutate them, and benchmark collapse falsifiability. Authored by Liam Grinstead.")
|
| 23 |
|
| 24 |
with gr.Tab("Simulate Agent"):
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 29 |
simulate_btn = gr.Button("Run Simulation")
|
| 30 |
-
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
with gr.Tab("View Registry"):
|
| 34 |
registry_output = gr.Textbox(label="Codex Registry", lines=20)
|
|
|
|
| 8 |
mutation_profile = build_mutation(agent_id, collapse_torque, tier_drift, emotional_resonance)
|
| 9 |
fields, score, hash_val = run_simulation(agent_id, mutation_profile)
|
| 10 |
append_to_registry(agent_id, collapse_torque, tier_drift, emotional_resonance, score, hash_val)
|
| 11 |
+
summary = (
|
| 12 |
+
f"📊 <b>Fitness Score:</b> {score}<br>"
|
| 13 |
+
f"🔐 <b>SHA-512 Hash:</b> <code>{hash_val}</code>"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
)
|
| 15 |
+
return fields["Φᵢ"], fields["Kᵢⱼ"], fields["Φ_col"], summary
|
| 16 |
|
| 17 |
with gr.Blocks() as demo:
|
| 18 |
gr.Markdown("# 🧠 Codex Consciousness Simulator")
|
| 19 |
gr.Markdown("Spawn symbolic agents, mutate them, and benchmark collapse falsifiability. Authored by Liam Grinstead.")
|
| 20 |
|
| 21 |
with gr.Tab("Simulate Agent"):
|
| 22 |
+
with gr.Row():
|
| 23 |
+
agent_id = gr.Dropdown(["Agent_5", "Agent_7", "Agent_1032"], label="Agent ID")
|
| 24 |
+
collapse_torque = gr.Dropdown(["Gen6508_M5", "Gen26_M23"], label="Collapse Torque Overlay")
|
| 25 |
+
emotional_resonance = gr.Checkbox(label="Inject Emotional Resonance")
|
| 26 |
+
tier_drift = gr.Dropdown(["Tier_1", "Tier_2", "Tier_6"], label="Tier Drift")
|
| 27 |
simulate_btn = gr.Button("Run Simulation")
|
| 28 |
+
|
| 29 |
+
with gr.Row():
|
| 30 |
+
Φᵢ_svg = gr.HTML(label="Φᵢ Awareness Field")
|
| 31 |
+
Kᵢⱼ_svg = gr.HTML(label="Kᵢⱼ Correlation Kernel")
|
| 32 |
+
Φ_col_svg = gr.HTML(label="Φ_col Coherence Field")
|
| 33 |
+
|
| 34 |
+
summary = gr.HTML(label="Simulation Summary")
|
| 35 |
+
simulate_btn.click(
|
| 36 |
+
simulate,
|
| 37 |
+
inputs=[agent_id, collapse_torque, emotional_resonance, tier_drift],
|
| 38 |
+
outputs=[Φᵢ_svg, Kᵢⱼ_svg, Φ_col_svg, summary]
|
| 39 |
+
)
|
| 40 |
|
| 41 |
with gr.Tab("View Registry"):
|
| 42 |
registry_output = gr.Textbox(label="Codex Registry", lines=20)
|