Spaces:
Runtime error
Runtime error
Commit ·
9fc18f9
1
Parent(s): 9fc36a6
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,7 @@ tool = language_tool_python.LanguageToolPublicAPI('fr')
|
|
| 8 |
# corrected_text = tool.correct(text)
|
| 9 |
# print(corrected_text)
|
| 10 |
|
| 11 |
-
def inference(
|
| 12 |
-
input_text = text
|
| 13 |
output = tool.correct(input_text)
|
| 14 |
return print(output)
|
| 15 |
|
|
@@ -19,7 +18,7 @@ description = "将需要校对的文字贴在左侧方框中,点击Submit,稍等
|
|
| 19 |
|
| 20 |
demo = gr.Interface(
|
| 21 |
fn = inference,
|
| 22 |
-
inputs=gr.Textbox(lines
|
| 23 |
outputs = "text",
|
| 24 |
title=title,
|
| 25 |
description=description,
|
|
|
|
| 8 |
# corrected_text = tool.correct(text)
|
| 9 |
# print(corrected_text)
|
| 10 |
|
| 11 |
+
def inference(input_text):
|
|
|
|
| 12 |
output = tool.correct(input_text)
|
| 13 |
return print(output)
|
| 14 |
|
|
|
|
| 18 |
|
| 19 |
demo = gr.Interface(
|
| 20 |
fn = inference,
|
| 21 |
+
inputs=gr.Textbox(lines=10, label="Input"),
|
| 22 |
outputs = "text",
|
| 23 |
title=title,
|
| 24 |
description=description,
|