Spaces:
Runtime error
Runtime error
shibing624
commited on
Commit
·
04a455f
1
Parent(s):
c659f9c
update demo.
Browse files
app.py
CHANGED
@@ -40,22 +40,19 @@ def ai_text(texts):
|
|
40 |
return result
|
41 |
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
[
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
gr.Interface(ai_text, "text", "text", title="Chinese Text Correction shibing624/macbert4csc-base-chinese",
|
60 |
-
description="Copy or input error Chinese text. Submit and the machine will correct text.",
|
61 |
-
examples=examples).launch()
|
|
|
40 |
return result
|
41 |
|
42 |
|
43 |
+
if __name__ == '__main__':
|
44 |
+
print(ai_text(['少先队员因该为老人让坐']))
|
45 |
+
|
46 |
+
examples = [
|
47 |
+
[['真麻烦你了。希望你们好好的跳无']],
|
48 |
+
[['少先队员因该为老人让坐']],
|
49 |
+
[['机七学习是人工智能领遇最能体现智能的一个分知']],
|
50 |
+
[['今天心情很好']],
|
51 |
+
[['他法语说的很好,的语也不错']],
|
52 |
+
[['他们的吵翻很不错,再说他们做的咖喱鸡也好吃']],
|
53 |
+
]
|
54 |
+
|
55 |
+
output_text = gr.outputs.Textbox()
|
56 |
+
gr.Interface(ai_text, "textbox", output_text, title="Chinese Text Correction shibing624/macbert4csc-base-chinese",
|
57 |
+
description="Copy or input error Chinese text. Submit and the machine will correct text.",
|
58 |
+
examples=examples).launch()
|
|
|
|
|
|