Update app.py
Browse files
app.py
CHANGED
|
@@ -8,12 +8,38 @@ example_texts = {
|
|
| 8 |
|
| 9 |
|
| 10 |
def get_readability_level(fog_index):
|
| 11 |
-
if fog_index
|
| 12 |
-
return "
|
| 13 |
-
elif fog_index
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
return "High School Senior Level"
|
| 15 |
-
elif fog_index
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
return "College Junior Level"
|
|
|
|
|
|
|
| 17 |
else:
|
| 18 |
return "Graduate School Level"
|
| 19 |
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def get_readability_level(fog_index):
|
| 11 |
+
if fog_index < 2:
|
| 12 |
+
return "First Grade Level"
|
| 13 |
+
elif fog_index < 3:
|
| 14 |
+
return "Second Grade Level"
|
| 15 |
+
elif fog_index < 4:
|
| 16 |
+
return "Third Grade Level"
|
| 17 |
+
elif fog_index < 5:
|
| 18 |
+
return "Fourth Grade Level"
|
| 19 |
+
elif fog_index < 6:
|
| 20 |
+
return "Fifth Grade Level"
|
| 21 |
+
elif fog_index < 7:
|
| 22 |
+
return "Sixth Grade Level"
|
| 23 |
+
elif fog_index < 8:
|
| 24 |
+
return "Seventh Grade Level"
|
| 25 |
+
elif fog_index < 9:
|
| 26 |
+
return "Eight Grade Level"
|
| 27 |
+
elif fog_index < 10:
|
| 28 |
+
return "High School Freshman Level"
|
| 29 |
+
elif fog_index < 11:
|
| 30 |
+
return "High School Sophomore Level"
|
| 31 |
+
elif fog_index < 12:
|
| 32 |
+
return "High School Junior Level"
|
| 33 |
+
elif fog_index < 13:
|
| 34 |
return "High School Senior Level"
|
| 35 |
+
elif fog_index < 14:
|
| 36 |
+
return "College Freshman Level"
|
| 37 |
+
elif fog_index < 15:
|
| 38 |
+
return "College Sophomore Level"
|
| 39 |
+
elif fog_index < 16:
|
| 40 |
return "College Junior Level"
|
| 41 |
+
elif fog_index < 17:
|
| 42 |
+
return "College Senior Level"
|
| 43 |
else:
|
| 44 |
return "Graduate School Level"
|
| 45 |
|