Arnaudding001 commited on
Commit
ab67fdb
·
1 Parent(s): e5c49a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -9,19 +9,21 @@ tool = language_tool_python.LanguageToolPublicAPI('fr')
9
  # print(corrected_text)
10
 
11
  def inference(input_text):
12
- output = tool.correct(input_text)
13
- return print(output)
14
 
15
  title = "法语语法修改App"
16
 
17
  description = "将需要校对的文字贴在左侧方框中,点击Submit,稍等片刻,右侧Output将给出修改后的文本,字数限制300字。"
18
 
19
 
20
- gr.Interface(
21
- inference
22
- gr.inputs.Textbox(label="Input"),
23
- gr.outputs.Textbox('text', label="Text corrigé"),
24
  title=title,
25
  description=description
26
- ).launch()
 
 
 
27
 
 
9
  # print(corrected_text)
10
 
11
  def inference(input_text):
12
+ return tool.correct(input_text)
 
13
 
14
  title = "法语语法修改App"
15
 
16
  description = "将需要校对的文字贴在左侧方框中,点击Submit,稍等片刻,右侧Output将给出修改后的文本,字数限制300字。"
17
 
18
 
19
+ demo = gr.Interface(
20
+ fn = inference,
21
+ inputs = 'text'
22
+ outpust = 'text',
23
  title=title,
24
  description=description
25
+ )
26
+
27
+
28
+ demo.launch()
29