ziem-io commited on
Commit
7fa1794
·
1 Parent(s): b6ecc6e

Update: Adjust threshold in lang detection

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -73,7 +73,7 @@ model_flavours.to(device).eval()
73
 
74
  ID = LanguageIdentifier.from_modelstring(model, norm_probs=True)
75
 
76
- def is_eng(text: str, min_chars: int = 6, threshold: float = 0.50):
77
  t = (text or "").strip()
78
  if len(t) < min_chars:
79
  return True, 0.0
 
73
 
74
  ID = LanguageIdentifier.from_modelstring(model, norm_probs=True)
75
 
76
+ def is_eng(text: str, min_chars: int = 6, threshold: float = 0.1):
77
  t = (text or "").strip()
78
  if len(t) < min_chars:
79
  return True, 0.0