Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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(
|