Spaces:
Sleeping
Sleeping
Update: Adjust threshold in lang detection
Browse files
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.
|
| 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
|