Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,9 @@ def monitor_feed():
|
|
67 |
if len(anomaly_counts) > 100:
|
68 |
anomaly_counts.pop(0)
|
69 |
|
70 |
-
|
|
|
|
|
71 |
|
72 |
# Chart generator
|
73 |
def generate_chart():
|
@@ -92,7 +94,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
|
|
92 |
with gr.Column(scale=3):
|
93 |
video_output = gr.Image(label="Live Video Feed", elem_id="video-feed", width=640, height=480)
|
94 |
with gr.Column(scale=1):
|
95 |
-
metrics_output = gr.
|
96 |
|
97 |
with gr.Row():
|
98 |
with gr.Column():
|
|
|
67 |
if len(anomaly_counts) > 100:
|
68 |
anomaly_counts.pop(0)
|
69 |
|
70 |
+
metrics_str = "\n".join([f"{k}: {v}" for k, v in last_metrics.items()])
|
71 |
+
|
72 |
+
return frame[:, :, ::-1], metrics_str, "\n".join(log_entries[-10:]), generate_chart(), last_detected_images
|
73 |
|
74 |
# Chart generator
|
75 |
def generate_chart():
|
|
|
94 |
with gr.Column(scale=3):
|
95 |
video_output = gr.Image(label="Live Video Feed", elem_id="video-feed", width=640, height=480)
|
96 |
with gr.Column(scale=1):
|
97 |
+
metrics_output = gr.Textbox(label="Live Metrics", lines=5)
|
98 |
|
99 |
with gr.Row():
|
100 |
with gr.Column():
|