Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def predict_email(text):
|
|
| 41 |
prob_spam = model(X_tensor).item()
|
| 42 |
|
| 43 |
# Manually calculate Ham probability as the complement of Spam
|
| 44 |
-
return {"
|
| 45 |
|
| 46 |
# ---------- Gradio Interface ----------
|
| 47 |
iface = gr.Interface(
|
|
|
|
| 41 |
prob_spam = model(X_tensor).item()
|
| 42 |
|
| 43 |
# Manually calculate Ham probability as the complement of Spam
|
| 44 |
+
return {"Safe": 1 - prob_spam, "Spam": prob_spam}
|
| 45 |
|
| 46 |
# ---------- Gradio Interface ----------
|
| 47 |
iface = gr.Interface(
|