Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import streamlit as st
|
|
| 5 |
st.header('Spam Detection using Naive Bayes Classifier')
|
| 6 |
vectorizer = load('tfidf_vectorizer.joblib')
|
| 7 |
user_input = st.text_input("Enter some text:", "")
|
| 8 |
-
if user_input is not None:
|
| 9 |
x = vectorizer.transform([user_input])
|
| 10 |
model = load('Naive_Bayes_Spam_Detection.joblib')
|
| 11 |
pred = model.predict(x)
|
|
|
|
| 5 |
st.header('Spam Detection using Naive Bayes Classifier')
|
| 6 |
vectorizer = load('tfidf_vectorizer.joblib')
|
| 7 |
user_input = st.text_input("Enter some text:", "")
|
| 8 |
+
if user_input is not None and user_input is not "":
|
| 9 |
x = vectorizer.transform([user_input])
|
| 10 |
model = load('Naive_Bayes_Spam_Detection.joblib')
|
| 11 |
pred = model.predict(x)
|