Spaces:
Runtime error
Runtime error
Disable cache examples
Browse files
app.py
CHANGED
@@ -32,6 +32,9 @@ def infer(
|
|
32 |
):
|
33 |
res = lac.seg(input_text.split('\n'), split_long=False)['seg']['res']
|
34 |
return '\n'.join([' / '.join(r) for r in res]) # , '\n'.join([' / '.join(jieba.cut(sent)) for sent in input_text.split('\n')])
|
|
|
|
|
|
|
35 |
gr.Interface(
|
36 |
fn=infer,
|
37 |
inputs=[
|
@@ -65,6 +68,7 @@ gr.Interface(
|
|
65 |
# "ไปๅคฉ่ท้็พๅบๅป้่กๅฆ๏ผๆ็น็ฅไป็ๅ778่ถ็พ้yyds๏ผ็็็ป็ปๅญ ๏ฝ่ฟ็นๅไบไธช้่็ๅๅ็็็ป็ปๅญๅ๏ผ๏ผ่ถ็พ้็ๅ่ฃ
ๅฐฑๆฏyyds<br/>"
|
66 |
# "<br/>",
|
67 |
examples=examples,
|
|
|
68 |
theme=gr.themes.Default(spacing_size="sm", radius_size="none", text_size=gr.themes.sizes.text_lg)
|
69 |
-
).launch(
|
70 |
|
|
|
32 |
):
|
33 |
res = lac.seg(input_text.split('\n'), split_long=False)['seg']['res']
|
34 |
return '\n'.join([' / '.join(r) for r in res]) # , '\n'.join([' / '.join(jieba.cut(sent)) for sent in input_text.split('\n')])
|
35 |
+
|
36 |
+
# https://discuss.huggingface.co/t/connection-errored-out/25329
|
37 |
+
# https://discuss.huggingface.co/t/error-connection-errored-out-during-processing/23439
|
38 |
gr.Interface(
|
39 |
fn=infer,
|
40 |
inputs=[
|
|
|
68 |
# "ไปๅคฉ่ท้็พๅบๅป้่กๅฆ๏ผๆ็น็ฅไป็ๅ778่ถ็พ้yyds๏ผ็็็ป็ปๅญ ๏ฝ่ฟ็นๅไบไธช้่็ๅๅ็็็ป็ปๅญๅ๏ผ๏ผ่ถ็พ้็ๅ่ฃ
ๅฐฑๆฏyyds<br/>"
|
69 |
# "<br/>",
|
70 |
examples=examples,
|
71 |
+
cache_examples=False,
|
72 |
theme=gr.themes.Default(spacing_size="sm", radius_size="none", text_size=gr.themes.sizes.text_lg)
|
73 |
+
).launch()
|
74 |
|