oberbics commited on
Commit
dcbbbd5
·
verified ·
1 Parent(s): 8f5bf14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  os.environ["OMP_NUM_THREADS"] = "1"
3
-
4
  import gradio as gr
5
  import torch
6
  import re
@@ -186,7 +186,8 @@ def get_logs():
186
  for line in recent_logs:
187
  entry = json.loads(line)
188
  confidence_info = f", Confidence: {entry['confidence_score']:.3f}" if entry.get('confidence_score') else ""
189
- summary = f"[{entry['timestamp']}] Input: {entry['input_length']} chars, Output: {entry['output_length']} chars, Time: {entry['processing_time_seconds']:.2f}s{confidence_info}"
 
190
  if entry['has_error']:
191
  summary += f" ERROR: {entry['error_message']}"
192
  log_summary.append(summary)
 
1
  import os
2
  os.environ["OMP_NUM_THREADS"] = "1"
3
+
4
  import gradio as gr
5
  import torch
6
  import re
 
186
  for line in recent_logs:
187
  entry = json.loads(line)
188
  confidence_info = f", Confidence: {entry['confidence_score']:.3f}" if entry.get('confidence_score') else ""
189
+ rejected_info = " [REJECTED]" if entry.get('rejected') else ""
190
+ summary = f"[{entry['timestamp']}] Input: {entry['input_length']} chars, Output: {entry['output_length']} chars, Time: {entry['processing_time_seconds']:.2f}s{confidence_info}{rejected_info}"
191
  if entry['has_error']:
192
  summary += f" ERROR: {entry['error_message']}"
193
  log_summary.append(summary)