Spaces:
Runtime error
Runtime error
jinggujiwoo7
commited on
Update app.py
Browse files
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 |
-
|
|
|
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():
|