Spaces:
Runtime error
Runtime error
File size: 391 Bytes
1cd2508 4124ff0 1cd2508 7223896 4124ff0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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 模型。",
api_name="run_predict" # ✅ 設在這裡
)
demo.launch() |