readme / app.py
Turkeyengineer's picture
Update app.py
701a9c4 verified
raw
history blame
409 Bytes
import gradio as gr
def segment(text):
# 示意:將中文句子依字分開(暫代斷詞功能)
return " / ".join(list(text))
demo = gr.Interface(
fn=segment,
inputs=gr.Textbox(lines=2, placeholder="輸入一段中文..."),
outputs="text",
title="中文斷詞模擬器",
description="這是一個簡易的中文斷詞工具,未來將整合 CKIP 模型。"
)
demo.launch()