jerrychen428 commited on
Commit
a02bf1b
·
verified ·
1 Parent(s): cfbf6d2

Update app,py

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