Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,13 @@ def monitor_feed():
|
|
58 |
|
59 |
# Update persistent logs and stats
|
60 |
anomaly_detected = len(last_metrics.get('anomalies', []))
|
61 |
-
anomaly_types_all.extend([
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
log_entries.append(f"{last_timestamp} - Frame {frame_count} - Anomalies: {anomaly_detected}")
|
63 |
anomaly_counts.append(anomaly_detected)
|
64 |
|
|
|
58 |
|
59 |
# Update persistent logs and stats
|
60 |
anomaly_detected = len(last_metrics.get('anomalies', []))
|
61 |
+
anomaly_types_all.extend([
|
62 |
+
a['label']
|
63 |
+
for a in last_metrics.get('anomalies', [])
|
64 |
+
if isinstance(a, dict) and 'label' in a
|
65 |
+
])
|
66 |
+
|
67 |
+
|
68 |
log_entries.append(f"{last_timestamp} - Frame {frame_count} - Anomalies: {anomaly_detected}")
|
69 |
anomaly_counts.append(anomaly_detected)
|
70 |
|