YashashMathur commited on
Commit
7048859
·
verified ·
1 Parent(s): 17768b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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.get("scenario_id", f"sc-{scenario_idx}"),
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=["data-eng", "sec-ops", "api-dev", "admin", "support",
151
- "code-reviewer", "general-dev", "planner", "customer-support"],
152
- value="data-eng",
153
  label="Worker Role",
154
  )
155
  scenario_input = gr.Slider(
156
  minimum=0,
157
- maximum=99,
158
  step=1,
159
  value=0,
160
  label="Demo Scenario",
161
- info="0–99: cycles through the 500-scenario training dataset",
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")