Spaces:
Runtime error
Runtime error
File size: 593 Bytes
72ba1f8 9fc18f9 ab67fdb 72ba1f8 ef49885 72ba1f8 e72aed3 ab67fdb cd8c982 08e3a61 e72aed3 ab67fdb e72aed3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
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()
|