Spaces:
Runtime error
Runtime error
Updating Syntax Error
Browse files
app.py
CHANGED
|
@@ -225,7 +225,7 @@ def reading_difficulty(excerpt):
|
|
| 225 |
win_preds = []
|
| 226 |
for text in windows:
|
| 227 |
win_preds.append(predict(text, tokenizer).item())
|
| 228 |
-
result =
|
| 229 |
score = -(result * 1.786 + 6.4) + 10
|
| 230 |
return "Difficulty Level: " + str(round(score, 2)) + '/10' + ' | A ' + str(
|
| 231 |
level(score)) + " student could understand this"
|
|
|
|
| 225 |
win_preds = []
|
| 226 |
for text in windows:
|
| 227 |
win_preds.append(predict(text, tokenizer).item())
|
| 228 |
+
result = np.mean(win_preds)
|
| 229 |
score = -(result * 1.786 + 6.4) + 10
|
| 230 |
return "Difficulty Level: " + str(round(score, 2)) + '/10' + ' | A ' + str(
|
| 231 |
level(score)) + " student could understand this"
|