Spaces:
Build error
Build error
fixup
Browse files
app.py
CHANGED
@@ -27,7 +27,9 @@ def feedback(text):
|
|
27 |
batch = grammar_tokenizer([text],truncation=True,padding='max_length',max_length=64, return_tensors="pt")
|
28 |
corrections = grammar_model.generate(**batch,max_length=64,num_beams=2, num_return_sequences=num_return_sequences, temperature=1.5)
|
29 |
corrected_text = grammar_tokenizer.decode(corrections[0], clean_up_tokenization_spaces=True, skip_special_tokens=True)
|
30 |
-
print("The
|
|
|
|
|
31 |
if corrected_text == text:
|
32 |
feedback = f'Looks good! Keep up the good work'
|
33 |
else:
|
|
|
27 |
batch = grammar_tokenizer([text],truncation=True,padding='max_length',max_length=64, return_tensors="pt")
|
28 |
corrections = grammar_model.generate(**batch,max_length=64,num_beams=2, num_return_sequences=num_return_sequences, temperature=1.5)
|
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:
|