SuriRaja commited on
Commit
69b5e20
·
1 Parent(s): d31dc0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -157,18 +157,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
157
  while True:
158
  frame, metrics, logs, chart, pie, captured = monitor_feed()
159
  # Format metrics display
160
- anomaly_text = ""
161
- if 'anomalies' in metrics and isinstance(metrics['anomalies'], list):
162
- anomaly_text = "\n".join(
163
- f"- {a.get('label', 'Unknown')} at {a.get('position', 'N/A')}" if isinstance(a, dict) else str(a)
164
- for a in metrics['anomalies']
165
- )
166
- else:
167
- anomaly_text = "No anomalies detected"
168
-
169
- metric_summary = f"📊 Total Anomalies: {len(metrics.get('anomalies', []))}\n{anomaly_text}"
170
-
171
- yield frame, metric_summary, logs, chart, pie, captured
172
 
173
  time.sleep(frame_rate)
174
 
 
157
  while True:
158
  frame, metrics, logs, chart, pie, captured = monitor_feed()
159
  # Format metrics display
160
+ yield frame, str(metrics), logs, chart, pie, captured
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  time.sleep(frame_rate)
163