Turkeyengineer commited on
Commit
7223896
·
verified ·
1 Parent(s): 735a597

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
 
3
  def segment(text):
4
- # 示意:將中文句子依字分開(暫代斷詞功能)
5
  return " / ".join(list(text))
6
 
7
  demo = gr.Interface(
@@ -9,6 +8,8 @@ demo = gr.Interface(
9
  inputs=gr.Textbox(lines=2, placeholder="輸入一段中文..."),
10
  outputs="text",
11
  title="中文斷詞模擬器",
12
- description="這是一個簡易的中文斷詞工具,未來將整合 CKIP 模型。"
 
13
  )
 
14
  demo.launch()
 
1
  import gradio as gr
2
 
3
  def segment(text):
 
4
  return " / ".join(list(text))
5
 
6
  demo = gr.Interface(
 
8
  inputs=gr.Textbox(lines=2, placeholder="輸入一段中文..."),
9
  outputs="text",
10
  title="中文斷詞模擬器",
11
+ description="這是一個簡易的中文斷詞工具,未來將整合 CKIP 模型。",
12
+ **api_name="segment"**
13
  )
14
+
15
  demo.launch()