Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,6 +64,7 @@ def train_model(X_train, y_train, preprocess, model_name):
|
|
| 64 |
'Logistic Regression': LogisticRegression(),
|
| 65 |
'KNN': KNeighborsClassifier()
|
| 66 |
}
|
|
|
|
| 67 |
model = models[model_name]
|
| 68 |
pipeline = Pipeline([
|
| 69 |
('preprocessor', preprocess),
|
|
@@ -113,4 +114,4 @@ if st.button("🔮 Predict Cancer Presence"):
|
|
| 113 |
|
| 114 |
st.write("Cancer Prediction:", "✅ Positive" if prediction[0] == 1 else "❌ Negative")
|
| 115 |
else:
|
| 116 |
-
st.error("Please train a
|
|
|
|
| 64 |
'Logistic Regression': LogisticRegression(),
|
| 65 |
'KNN': KNeighborsClassifier()
|
| 66 |
}
|
| 67 |
+
|
| 68 |
model = models[model_name]
|
| 69 |
pipeline = Pipeline([
|
| 70 |
('preprocessor', preprocess),
|
|
|
|
| 114 |
|
| 115 |
st.write("Cancer Prediction:", "✅ Positive" if prediction[0] == 1 else "❌ Negative")
|
| 116 |
else:
|
| 117 |
+
st.error("Please train a model first!")
|