Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,8 +99,15 @@ def macro_correct(text):
|
|
| 99 |
if __name__ == '__main__':
|
| 100 |
print(macro_correct('少先队员因该为老人让坐'))
|
| 101 |
|
| 102 |
-
text_sample = '机七学习是人工智能领遇最能体现智能的一个分知'
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
gr.Interface(
|
| 105 |
macro_correct,
|
| 106 |
inputs='text',
|
|
@@ -108,7 +115,8 @@ if __name__ == '__main__':
|
|
| 108 |
title="Chinese Spelling Correction Model Macropodus/macbert4csc_v2",
|
| 109 |
description="Copy or input error Chinese text. Submit and the machine will correct text.",
|
| 110 |
article="Link to <a href='https://github.com/yongzhuo/macro-correct' style='color:blue;' target='_blank\'>Github REPO: macro-correct</a>",
|
| 111 |
-
|
| 112 |
).launch()
|
| 113 |
# ).launch(server_name="0.0.0.0", server_port=8066, share=False, debug=True)
|
|
|
|
| 114 |
|
|
|
|
| 99 |
if __name__ == '__main__':
|
| 100 |
print(macro_correct('少先队员因该为老人让坐'))
|
| 101 |
|
|
|
|
| 102 |
|
| 103 |
+
examples = [
|
| 104 |
+
"机七学习是人工智能领遇最能体现智能的一个分知",
|
| 105 |
+
"我是练习时长两念半的鸽仁练习生蔡徐坤",
|
| 106 |
+
"真麻烦你了。希望你们好好的跳无",
|
| 107 |
+
"他法语说的很好,的语也不错",
|
| 108 |
+
"遇到一位很棒的奴生跟我疗天",
|
| 109 |
+
"我们为这个目标努力不解",
|
| 110 |
+
]
|
| 111 |
gr.Interface(
|
| 112 |
macro_correct,
|
| 113 |
inputs='text',
|
|
|
|
| 115 |
title="Chinese Spelling Correction Model Macropodus/macbert4csc_v2",
|
| 116 |
description="Copy or input error Chinese text. Submit and the machine will correct text.",
|
| 117 |
article="Link to <a href='https://github.com/yongzhuo/macro-correct' style='color:blue;' target='_blank\'>Github REPO: macro-correct</a>",
|
| 118 |
+
examples=examples
|
| 119 |
).launch()
|
| 120 |
# ).launch(server_name="0.0.0.0", server_port=8066, share=False, debug=True)
|
| 121 |
+
|
| 122 |
|