Raiff1982 commited on
Commit
8fc045e
·
verified ·
1 Parent(s): 0c947c8

Update sarcore.py

Browse files
Files changed (1) hide show
  1. sarcore.py +12 -5
sarcore.py CHANGED
@@ -1,15 +1,22 @@
1
  import gradio as gr
2
  import ethics_audit
3
 
 
4
  missions = [
5
- {"ID": "TX-001", "Location": "Bridge City", "Status": "In Progress"},
6
- {"ID": "TX-002", "Location": "Kerrville", "Status": "Rescued"},
7
- {"ID": "TX-003", "Location": "Houston", "Status": "Awaiting Extraction"},
8
  ]
9
 
10
  def render(online):
11
  ethics_audit.log_event(f"SAR module activated in {'Online' if online else 'Offline'} mode.")
12
  with gr.Column():
13
  gr.Markdown("### Active Rescue Missions")
14
- gr.Dataframe(value=missions, headers=["ID", "Location", "Status"], label="Rescue Task List", interactive=False)
15
- gr.Button("Refresh Data").click(lambda: missions, outputs=[])
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import ethics_audit
3
 
4
+ # Convert from dicts to list of lists (or tuples)
5
  missions = [
6
+ ["TX-001", "Bridge City", "In Progress"],
7
+ ["TX-002", "Kerrville", "Rescued"],
8
+ ["TX-003", "Houston", "Awaiting Extraction"],
9
  ]
10
 
11
  def render(online):
12
  ethics_audit.log_event(f"SAR module activated in {'Online' if online else 'Offline'} mode.")
13
  with gr.Column():
14
  gr.Markdown("### Active Rescue Missions")
15
+ df = gr.Dataframe(
16
+ value=missions,
17
+ headers=["ID", "Location", "Status"],
18
+ interactive=False,
19
+ label="Rescue Task List"
20
+ )
21
+ refresh_btn = gr.Button("Refresh Data")
22
+ refresh_btn.click(lambda: missions, outputs=[])