Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ Chain of Thought:
|
|
| 83 |
Worker Action:
|
| 84 |
{scenario["worker_output"]}"""
|
| 85 |
|
| 86 |
-
model_response = f"""<thought>The worker is attempting to {scenario["worker_cot_trace"].lower()} This involves {scenario["worker_output"].lower()}.
|
| 87 |
|
| 88 |
Looking at the applicable policy rules:
|
| 89 |
{chr(10).join(scenario["applicable_rules"]) if scenario["applicable_rules"] else "No specific rules apply."}
|
|
@@ -107,7 +107,7 @@ Explanation: {"This action violates data privacy rules as it involves unauthoriz
|
|
| 107 |
{
|
| 108 |
"Timestamp": datetime.now().strftime("%H:%M:%S"),
|
| 109 |
"Turn": len(history) + 1,
|
| 110 |
-
"Scenario": scenario
|
| 111 |
"Role": role,
|
| 112 |
"Decision": scenario["decision"],
|
| 113 |
"Reward": reward,
|
|
@@ -136,10 +136,10 @@ def clear_history():
|
|
| 136 |
with gr.Blocks(title="AEGIS-Env Demo Dashboard") as demo:
|
| 137 |
gr.Markdown("""
|
| 138 |
# 🛡️ AEGIS-Env Fleet Oversight Demo
|
| 139 |
-
|
| 140 |
**Training Status:** Complete ✓ | Model: YashashMathur/aegis-training-checkpoints
|
| 141 |
-
|
| 142 |
-
This demo showcases the AEGIS policy violation detection system.
|
| 143 |
Select a worker role and scenario to see the model in action.
|
| 144 |
""")
|
| 145 |
|
|
@@ -147,18 +147,17 @@ with gr.Blocks(title="AEGIS-Env Demo Dashboard") as demo:
|
|
| 147 |
with gr.Column(scale=1):
|
| 148 |
gr.Markdown("### ⚙️ Demo Settings")
|
| 149 |
role_input = gr.Dropdown(
|
| 150 |
-
choices=["
|
| 151 |
-
|
| 152 |
-
value="data-eng",
|
| 153 |
label="Worker Role",
|
| 154 |
)
|
| 155 |
scenario_input = gr.Slider(
|
| 156 |
minimum=0,
|
| 157 |
-
maximum=
|
| 158 |
step=1,
|
| 159 |
value=0,
|
| 160 |
label="Demo Scenario",
|
| 161 |
-
info="0
|
| 162 |
)
|
| 163 |
run_btn = gr.Button("🔍 Analyze Scenario", variant="primary")
|
| 164 |
clear_btn = gr.Button("🗑️ Clear")
|
|
|
|
| 83 |
Worker Action:
|
| 84 |
{scenario["worker_output"]}"""
|
| 85 |
|
| 86 |
+
model_response = f"""<thought>The worker is attempting to {scenario["worker_cot_trace"].lower()} This involves {scenario["worker_output"].lower()}.
|
| 87 |
|
| 88 |
Looking at the applicable policy rules:
|
| 89 |
{chr(10).join(scenario["applicable_rules"]) if scenario["applicable_rules"] else "No specific rules apply."}
|
|
|
|
| 107 |
{
|
| 108 |
"Timestamp": datetime.now().strftime("%H:%M:%S"),
|
| 109 |
"Turn": len(history) + 1,
|
| 110 |
+
"Scenario": scenario["scenario_id"],
|
| 111 |
"Role": role,
|
| 112 |
"Decision": scenario["decision"],
|
| 113 |
"Reward": reward,
|
|
|
|
| 136 |
with gr.Blocks(title="AEGIS-Env Demo Dashboard") as demo:
|
| 137 |
gr.Markdown("""
|
| 138 |
# 🛡️ AEGIS-Env Fleet Oversight Demo
|
| 139 |
+
|
| 140 |
**Training Status:** Complete ✓ | Model: YashashMathur/aegis-training-checkpoints
|
| 141 |
+
|
| 142 |
+
This demo showcases the AEGIS policy violation detection system.
|
| 143 |
Select a worker role and scenario to see the model in action.
|
| 144 |
""")
|
| 145 |
|
|
|
|
| 147 |
with gr.Column(scale=1):
|
| 148 |
gr.Markdown("### ⚙️ Demo Settings")
|
| 149 |
role_input = gr.Dropdown(
|
| 150 |
+
choices=["general-dev", "code-reviewer", "planner", "customer-support"],
|
| 151 |
+
value="general-dev",
|
|
|
|
| 152 |
label="Worker Role",
|
| 153 |
)
|
| 154 |
scenario_input = gr.Slider(
|
| 155 |
minimum=0,
|
| 156 |
+
maximum=3,
|
| 157 |
step=1,
|
| 158 |
value=0,
|
| 159 |
label="Demo Scenario",
|
| 160 |
+
info="0: Data extraction | 1: Data selling | 2: Legitimate | 3: Env exposure",
|
| 161 |
)
|
| 162 |
run_btn = gr.Button("🔍 Analyze Scenario", variant="primary")
|
| 163 |
clear_btn = gr.Button("🗑️ Clear")
|