Aidan Phillips
commited on
Commit
·
2970d8e
1
Parent(s):
7f92e26
update cutoffs
Browse files- app.py +2 -2
- categories/fluency.py +1 -1
app.py
CHANGED
@@ -24,9 +24,9 @@ def load_translations():
|
|
24 |
def score(score):
|
25 |
if score > 90:
|
26 |
return "excellent!"
|
27 |
-
elif score > 80:
|
28 |
-
return "good."
|
29 |
elif score > 70:
|
|
|
|
|
30 |
return "fair."
|
31 |
else:
|
32 |
return "poor."
|
|
|
24 |
def score(score):
|
25 |
if score > 90:
|
26 |
return "excellent!"
|
|
|
|
|
27 |
elif score > 70:
|
28 |
+
return "good."
|
29 |
+
elif score > 50:
|
30 |
return "fair."
|
31 |
else:
|
32 |
return "poor."
|
categories/fluency.py
CHANGED
@@ -138,7 +138,7 @@ def pseudo_perplexity(text: str, threshold: int = 4, max_len: int = 128) -> dict
|
|
138 |
{
|
139 |
"start": i,
|
140 |
"end": i,
|
141 |
-
"message": f"Adjusted liklihood {l} over threshold {threshold}",
|
142 |
}
|
143 |
)
|
144 |
|
|
|
138 |
{
|
139 |
"start": i,
|
140 |
"end": i,
|
141 |
+
"message": f"Adjusted liklihood {round(l, 2)} over threshold {threshold} for word {text.split()[i]}",
|
142 |
}
|
143 |
)
|
144 |
|