Arnaudding001's picture
Update app.py
cd8c982
raw
history blame contribute delete
593 Bytes
import os
import gradio as gr
import language_tool_python
tool = language_tool_python.LanguageToolPublicAPI('fr')
# corrected_text = tool.correct(text)
# print(corrected_text)
def inference(input_text):
return tool.correct(input_text)
title = "法语语法修改App"
description = "将需要校对的文字贴在左侧方框中,点击Submit,稍等片刻,右侧Output将给出修改后的文本,字数限制300字。"
demo = gr.Interface(
fn = inference,
inputs = 'text',
outputs = 'text',
title=title,
description=description
)
demo.launch()