jinggujiwoo7 commited on
Commit
645c2e9
1 Parent(s): 9ef4232

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,7 +43,8 @@ def pronunciation_correction(expected_text, file_info):
43
  def grammar_check(text):
44
  matches = tool.check(text)
45
  corrected_text = tool.correct(text)
46
- return corrected_text, matches
 
47
 
48
  with gr.Blocks() as app:
49
  with gr.Row():
 
43
  def grammar_check(text):
44
  matches = tool.check(text)
45
  corrected_text = tool.correct(text)
46
+ feedback = "\n".join(f"Line {match.contextOffset}: {match.message}" for match in matches)
47
+ return corrected_text, feedback
48
 
49
  with gr.Blocks() as app:
50
  with gr.Row():