Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def monitor_feed():
|
|
58 |
|
59 |
# Update persistent logs and stats
|
60 |
anomaly_detected = len(last_metrics.get('anomalies', []))
|
61 |
-
anomaly_types_all.extend([a['label'] for a in last_metrics.get('anomalies', [])])
|
62 |
log_entries.append(f"{last_timestamp} - Frame {frame_count} - Anomalies: {anomaly_detected}")
|
63 |
anomaly_counts.append(anomaly_detected)
|
64 |
|
@@ -127,7 +127,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
|
|
127 |
with gr.Row():
|
128 |
pause_btn = gr.Button("鈴革笍 Pause")
|
129 |
resume_btn = gr.Button("鈻讹笍 Resume")
|
130 |
-
frame_slider = gr.Slider(0.
|
131 |
|
132 |
def toggle_pause():
|
133 |
global paused
|
|
|
58 |
|
59 |
# Update persistent logs and stats
|
60 |
anomaly_detected = len(last_metrics.get('anomalies', []))
|
61 |
+
anomaly_types_all.extend([a['label'] for a in last_metrics.get('anomalies', []) if isinstance(a, dict) and 'label' in a])
|
62 |
log_entries.append(f"{last_timestamp} - Frame {frame_count} - Anomalies: {anomaly_detected}")
|
63 |
anomaly_counts.append(anomaly_detected)
|
64 |
|
|
|
127 |
with gr.Row():
|
128 |
pause_btn = gr.Button("鈴革笍 Pause")
|
129 |
resume_btn = gr.Button("鈻讹笍 Resume")
|
130 |
+
frame_slider = gr.Slider(0.0005, 5, value=1, label="Frame Interval (seconds)")
|
131 |
|
132 |
def toggle_pause():
|
133 |
global paused
|