CoolFace
Modelpublic

Keyurendraa/ml-static-scan-demo

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
train.py16 linesDownload Raw Back to root
1from sklearn.datasets import load_iris2from sklearn.ensemble import RandomForestClassifier3import joblib4 5# Load dataset6X, y = load_iris(return_X_y=True)7 8# Train model9model = RandomForestClassifier(random_state=42)10model.fit(X, y)11 12# Save model13joblib.dump(model, "iris_model.pkl")14 15print("Model saved successfully!")16