nugentc commited on
Commit
aa451fe
·
1 Parent(s): 5a4fdf8
Files changed (1) hide show
  1. app.py +3 -1
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 corrections are: ", corrections)
 
 
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: