File size: 316 Bytes
850dd49
 
 
4cd7e23
850dd49
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr

def predict(input_txt):
    return 0.46  # Worldwide spam rate in 2023. Source: https://securelist.com/spam-phishing-report-2023/112015/

demo = gr.Interface(
    fn=predict,
    inputs=["text"],
    outputs=["number"],
    title="Bayes or Spam?",
)

if __name__ == "__main__":
    demo.launch()