isboudja commited on
Commit
85cfa54
·
verified ·
1 Parent(s): 7f586a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -12,7 +12,10 @@ labels = learner.dls.vocab
12
 
13
  def predict(text):
14
  pred, pred_idx, probs = learner.predict(text)
15
- return {pred: float(probs[1])}
 
 
 
16
 
17
  # Create and launch the Gradio interface for text input
18
  gr.Interface(
 
12
 
13
  def predict(text):
14
  pred, pred_idx, probs = learner.predict(text)
15
+ if pred == '1':
16
+ return "Spam"
17
+ else:
18
+ return "Not Spam"
19
 
20
  # Create and launch the Gradio interface for text input
21
  gr.Interface(