Update app,py
Browse files
app,py
CHANGED
@@ -7,13 +7,13 @@ trainer.load_saved_model()
|
|
7 |
# 建立 Gradio 介面
|
8 |
import gradio as gr
|
9 |
|
10 |
-
|
11 |
-
fn=
|
12 |
inputs=gr.Textbox(lines=3, placeholder="輸入交易簡訊..."),
|
13 |
outputs="text",
|
14 |
title="💳 中英文詐騙簡訊判斷器",
|
15 |
description="輸入交易相關訊息,判斷是否為詐騙訊息(支援中文與英文)。"
|
16 |
-
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
-
|
|
|
7 |
# 建立 Gradio 介面
|
8 |
import gradio as gr
|
9 |
|
10 |
+
app = gr.Interface(
|
11 |
+
fn=predict_transaction, # 指定推論函式
|
12 |
inputs=gr.Textbox(lines=3, placeholder="輸入交易簡訊..."),
|
13 |
outputs="text",
|
14 |
title="💳 中英文詐騙簡訊判斷器",
|
15 |
description="輸入交易相關訊息,判斷是否為詐騙訊息(支援中文與英文)。"
|
16 |
+
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
+
app.launch(share=True, debug=True) # 如果防毒軟體會報錯,請將share=True, debug=True改為share=False
|