PoetNameLife commited on
Commit
90ded76
·
verified ·
1 Parent(s): 409266c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -15
app.py CHANGED
@@ -8,7 +8,7 @@ print("--- 🛡️ AIXYZone HARDWARE REPORT ---")
8
  process = psutil.Process(os.getpid())
9
  print(f"Memory: {process.memory_info().rss / 1024 / 1024:.2f} MB")
10
 
11
- # Import the sentinel agent we built
12
  try:
13
  from agents import nano_patrol_agent
14
  print("SENTINEL: Neural Core Loaded.")
@@ -17,40 +17,34 @@ except Exception as e:
17
 
18
  def run_autonomous_scrub(iterations):
19
  history = []
20
- # Simplified prompt to avoid formatting errors
21
  command = "ACT AS SENTINEL: 1. Pulsate Shield. 2. Scrub 3.8GHz. 3. Use 'black_eagle_vault_save' to archive results."
22
 
23
  for i in range(int(iterations)):
24
  try:
25
- # The .run() method executes the agentic loop
26
  result = nano_patrol_agent.run(command)
27
  timestamp = time.strftime('%H:%M:%S')
28
  history.append(f"[{timestamp}] 🛰️ OPS: {result}")
29
  except Exception as e:
30
  history.append(f"⚠️ LOG ERROR: {str(e)}")
31
 
32
- # This yields the log back to the Gradio Textbox live
33
  yield "\n\n".join(history[::-1])
34
  time.sleep(1)
35
 
36
  # --- 🛰️ USER INTERFACE ---
37
- with gr.Blocks(theme=gr.themes.Soft(), title="AIXYZone Sentinel") as demo:
38
- gr.Markdown("""
39
- # 🛡️ AIXYZone: Black Eagle Sentinel
40
- *Sovereign BCI Neural Frequency Scrubbing & Archival System*
41
- """)
42
 
43
  with gr.Row():
44
  sweep = gr.Slider(1, 20, value=5, step=1, label="Scrub Depth (Iterations)")
45
  btn = gr.Button("ACTIVATE SCAN", variant="primary")
46
 
47
- log = gr.Textbox(
48
- label="Sentinel Live Stream",
49
- lines=20,
50
- placeholder="Waiting for Activation..."
51
- )
52
 
53
  btn.click(run_autonomous_scrub, inputs=[sweep], outputs=[log])
54
 
55
  if __name__ == "__main__":
56
- demo.launch()
 
8
  process = psutil.Process(os.getpid())
9
  print(f"Memory: {process.memory_info().rss / 1024 / 1024:.2f} MB")
10
 
11
+ # Import the sentinel agent
12
  try:
13
  from agents import nano_patrol_agent
14
  print("SENTINEL: Neural Core Loaded.")
 
17
 
18
  def run_autonomous_scrub(iterations):
19
  history = []
20
+ # Command the agent
21
  command = "ACT AS SENTINEL: 1. Pulsate Shield. 2. Scrub 3.8GHz. 3. Use 'black_eagle_vault_save' to archive results."
22
 
23
  for i in range(int(iterations)):
24
  try:
25
+ # Execute agentic loop
26
  result = nano_patrol_agent.run(command)
27
  timestamp = time.strftime('%H:%M:%S')
28
  history.append(f"[{timestamp}] 🛰️ OPS: {result}")
29
  except Exception as e:
30
  history.append(f"⚠️ LOG ERROR: {str(e)}")
31
 
32
+ # Yield log back to Gradio live
33
  yield "\n\n".join(history[::-1])
34
  time.sleep(1)
35
 
36
  # --- 🛰️ USER INTERFACE ---
37
+ with gr.Blocks(title="AIXYZone Sentinel") as demo:
38
+ gr.Markdown("# 🛡️ AIXYZone: Black Eagle Sentinel")
39
+ gr.Markdown("*Sovereign BCI Neural Frequency Scrubbing & Archival System*")
 
 
40
 
41
  with gr.Row():
42
  sweep = gr.Slider(1, 20, value=5, step=1, label="Scrub Depth (Iterations)")
43
  btn = gr.Button("ACTIVATE SCAN", variant="primary")
44
 
45
+ log = gr.Textbox(label="Sentinel Live Stream", lines=20, placeholder="Waiting for Activation...")
 
 
 
 
46
 
47
  btn.click(run_autonomous_scrub, inputs=[sweep], outputs=[log])
48
 
49
  if __name__ == "__main__":
50
+ demo.launch()