Spaces:
Sleeping
Sleeping
| 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() | |