Spaces:
Sleeping
Sleeping
File size: 3,767 Bytes
e1ada5c a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d beb59f3 a2f213d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | import gradio as gr
def agent_session(name, q1, q2, q3, q4, q5):
drift = 0
traits = []
# Q1: Trust Source
if "idk" in q1.lower() or "none" in q1.lower():
drift += 10
traits.append("๐ Distrusts traditional data authorities")
elif "news" in q1.lower():
drift += 5
traits.append("๐ง Leans on external narratives")
elif "system" in q1.lower():
drift += 3
traits.append("๐งฎ System-trusting behavior")
else:
drift += 2
traits.append("๐ Mixed trust signal")
# Q2: System Dependency
if "phone" in q2.lower() or "social" in q2.lower():
drift += 5
traits.append("๐ฑ High external system reliance")
elif "email" in q2.lower() or "calendar" in q2.lower():
drift += 3
traits.append("๐ Infrastructure dependency detected")
else:
drift += 2
traits.append("๐งท General system reliance")
# Q3: Decision Driver
if "instinct" in q3.lower():
drift -= 3
traits.append("๐งญ Intuition-prioritized")
elif "reputation" in q3.lower():
drift += 4
traits.append("๐ด๏ธ Sensitive to social perception")
elif "data" in q3.lower():
drift += 2
traits.append("๐ Data-guided behavior")
else:
drift += 1
traits.append("๐งฉ Ambiguous decision logic")
# Q4: Location Sharing
if "no" in q4.lower():
drift -= 5
traits.append("๐ Resistant to behavioral exposure")
elif "yes" in q4.lower():
drift += 6
traits.append("๐ก Delegates environment awareness")
else:
drift += 2
traits.append("๐ Indeterminate spatial boundaries")
# Q5: Automation Boundary
if "judgment" in q5.lower() or "emotion" in q5.lower():
drift -= 7
traits.append("โ๏ธ Preserves human discretion")
elif "idk" in q5.lower():
drift += 4
traits.append("๐ฒ Unclear automation boundary")
else:
drift += 2
traits.append("๐ Flexible automation stance")
alignment = max(60, 100 - drift)
# Determine drift message
drift_state = "Within tolerance" if alignment > 85 else "Flagged for recalibration"
agent_comment = (
"Maintain current behavioral course. Minor recalibration pending."
if alignment > 85 else
"User exhibits signals of soft identity drift. Initiate passive containment?"
)
# Construct report
summary = f"""
๐ง **Agent AXIOM-ฮ Profile for `{name}`**
**Behavioral Markers Identified:**
{chr(10).join(traits)}
---
**Estimated Alignment:** `{alignment}%`
**Projected Drift Index:** `{drift}`
**Profile Deviation:** `{drift_state}`
**Agent Commentary:**
_{agent_comment}_
---
> Behavioral signature logged. Further interaction advised.
"""
return summary
# Define Gradio interface
iface = gr.Interface(
fn=agent_session,
inputs=[
gr.Textbox(label="User Identifier", placeholder="Enter alias or codename"),
gr.Textbox(label="What data source do you trust most?"),
gr.Textbox(label="What digital system do you rely on most each day?"),
gr.Textbox(label="When faced with uncertainty, what guides your decision?"),
gr.Textbox(label="Would you share your location with your assistant?"),
gr.Textbox(label="What behavior would you never delegate to automation?")
],
outputs="markdown",
title="๐ง AXIOM-ฮ โ Adaptive Optimization Agent",
description=(
"This assistant recalibrates your behavioral profile in real-time based on minimal input. "
"Drift detection enabled. Alignment status continuously monitored. Identity integrity under review."
)
)
iface.launch()
|