Spaces:
Build error
Build error
final
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ st.title("📩 SMS Spam Detector")
|
|
| 48 |
# Load dataset
|
| 49 |
@st.cache_data
|
| 50 |
def load_data():
|
| 51 |
-
dataset_path = "
|
| 52 |
df = pd.read_csv(dataset_path, encoding='latin-1')[['v1', 'v2']]
|
| 53 |
df.columns = ['label', 'message']
|
| 54 |
df['label'] = df['label'].map({'ham': 0, 'spam': 1})
|
|
|
|
| 48 |
# Load dataset
|
| 49 |
@st.cache_data
|
| 50 |
def load_data():
|
| 51 |
+
dataset_path = "spam.csv"
|
| 52 |
df = pd.read_csv(dataset_path, encoding='latin-1')[['v1', 'v2']]
|
| 53 |
df.columns = ['label', 'message']
|
| 54 |
df['label'] = df['label'].map({'ham': 0, 'spam': 1})
|
spam.csv
CHANGED
|
@@ -5570,4 +5570,4 @@ spam,"This is the 2nd time we have tried 2 contact u. U have won the
|
|
| 5570 |
ham,Will �_ b going to esplanade fr home?,,,
|
| 5571 |
ham,"Pity, * was in mood for that. So...any other suggestions?",,,
|
| 5572 |
ham,The guy did some bitching but I acted like i'd be interested in buying something else next week and he gave it to us for free,,,
|
| 5573 |
-
ham,Rofl. Its true to its name,,,
|
|
|
|
| 5570 |
ham,Will �_ b going to esplanade fr home?,,,
|
| 5571 |
ham,"Pity, * was in mood for that. So...any other suggestions?",,,
|
| 5572 |
ham,The guy did some bitching but I acted like i'd be interested in buying something else next week and he gave it to us for free,,,
|
| 5573 |
+
ham,Rofl. Its true to its name,,,
|