Arnaudding001 commited on
Commit
72ba1f8
·
1 Parent(s): e1fea13

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import gradio as gr
3
+ import language_tool_python
4
+
5
+ tool = language_tool_python.LanguageToolPublicAPI('fr')
6
+
7
+
8
+ # corrected_text = tool.correct(text)
9
+ # print(corrected_text)
10
+
11
+ def inference(text):
12
+ input_text = ''
13
+ output = tool.correct(input_text)
14
+ return print(output)
15
+
16
+ title = "法语语法修改App"
17
+
18
+ description = "将需要校对的文字贴在左侧方框中,点击Submit,稍等片刻,右侧Output将给出需要修改的提示。"
19
+
20
+ gr.Interface(
21
+ inference,
22
+ gr.inputs.Textbox(type="text", label="Input"),
23
+ gr.outputs.Textbox(type="text", label="Output"),
24
+ title=title,
25
+ description=description,
26
+ ).launch()