simon-clmtd commited on
Commit
5fc20da
Β·
verified Β·
1 Parent(s): 378b616
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,11 +54,11 @@ def process_ocr_qa(text, lang_choice):
54
  k = len(known_tokens)
55
  u = len(unknown_tokens)
56
  total = k + u
57
- ratio = f"{k}/{total}" if total > 0 else "0/0"
58
 
59
  score_emoji = "🟒" if score >= 0.8 else "🟑" if score >= 0.5 else "πŸ”΄"
60
  output_lines.append(
61
- f"{score_emoji} Quality Score: {score} ({ratio})"
62
  )
63
 
64
 
 
54
  k = len(known_tokens)
55
  u = len(unknown_tokens)
56
  total = k + u
57
+ ratio = f"{k}/{total}" if total > 0 else "n/a"
58
 
59
  score_emoji = "🟒" if score >= 0.8 else "🟑" if score >= 0.5 else "πŸ”΄"
60
  output_lines.append(
61
+ f"{score_emoji} Quality Score: {score if total else 'n/a'} ({ratio})"
62
  )
63
 
64