File size: 516 Bytes
23716e1 ef04742 23716e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# app.py
import gradio as gr
from Fraud_Detection_BERT_grado_6 import FinancialFraudTrainer
trainer = FinancialFraudTrainer()
trainer.load_model()
app = gr.Interface(
fn=trainer.predict_transaction,
inputs=gr.Textbox(lines=3, placeholder="輸入交易簡訊..."),
outputs="text",
title="💳 中英文詐騙簡訊判斷器",
description="輸入交易相關訊息,判斷是否為詐騙訊息(支援中文與英文)。"
)
if __name__ == "__main__":
app.launch(share=True, debug=True)
|