Spaces:
Build error
Build error
remove corrections about a final fullstop
Browse files
app.py
CHANGED
@@ -29,8 +29,8 @@ def feedback(text):
|
|
29 |
corrected_text = grammar_tokenizer.decode(corrections[0], clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
30 |
print("The corrected text is: ", corrected_text)
|
31 |
print("The orig text is: ", text)
|
32 |
-
|
33 |
-
if corrected_text == text:
|
34 |
feedback = f'Looks good! Keep up the good work'
|
35 |
else:
|
36 |
feedback = f'\'{corrected_text}\' might be a little better'
|
|
|
29 |
corrected_text = grammar_tokenizer.decode(corrections[0], clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
30 |
print("The corrected text is: ", corrected_text)
|
31 |
print("The orig text is: ", text)
|
32 |
+
if corrected_text.rstrip('.') == text.rstrip('.'):
|
33 |
+
# if corrected_text == text:
|
34 |
feedback = f'Looks good! Keep up the good work'
|
35 |
else:
|
36 |
feedback = f'\'{corrected_text}\' might be a little better'
|