Spaces:
Sleeping
Sleeping
Update sarcore.py
Browse files- sarcore.py +12 -5
sarcore.py
CHANGED
@@ -1,15 +1,22 @@
|
|
1 |
import gradio as gr
|
2 |
import ethics_audit
|
3 |
|
|
|
4 |
missions = [
|
5 |
-
|
6 |
-
|
7 |
-
|
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(
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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=[])
|