MLDeveloper commited on
Commit
778c2e9
·
verified ·
1 Parent(s): 5729ad1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,8 +10,9 @@ st.title("📩 SMS Spam Detection App")
10
  st.markdown("🔍 Enter a message below to check if it's **Spam** or **Not Spam (Ham)**")
11
 
12
  # --- Load Model and Vectorizer ---
13
- model = joblib.load("https://huggingface.co/spaces/MLDeveloper/Spam_SMS_Detection/resolve/main/spam.csv") # Make sure path is correct
14
- vectorizer = joblib.load("model/tfidf_vectorizer.pkl") # Adjust as per your folder
 
15
 
16
  # --- Text Cleaning Function ---
17
  def clean_text(text):
 
10
  st.markdown("🔍 Enter a message below to check if it's **Spam** or **Not Spam (Ham)**")
11
 
12
  # --- Load Model and Vectorizer ---
13
+ # These should be .pkl files, saved using joblib.dump() in your training script
14
+ model = joblib.load("model/spam_model.pkl") # Correct path to trained model
15
+ vectorizer = joblib.load("model/tfidf_vectorizer.pkl") # Correct path to vectorizer
16
 
17
  # --- Text Cleaning Function ---
18
  def clean_text(text):