🌸 iris-flower β€” Iris Species Classifier

A scikit-learn model that predicts the species of an Iris flower (setosa, versicolor, virginica) from four measurements.

  • Algorithm: RandomForestClassifier inside a StandardScaler Pipeline
  • Trained on: the classic Iris dataset (150 samples)
  • Accuracy: ~95% cross-validation, ~90% on held-out test data
  • Inputs (cm): sepal_length, sepal_width, petal_length, petal_width

πŸš€ Use it by name (anyone, anywhere)

pip install huggingface_hub joblib scikit-learn pandas
from huggingface_hub import hf_hub_download
import joblib, pandas as pd

# Download THIS model by its name from the Hub
path = hf_hub_download(repo_id="shrisivaj333/iris-flower", filename="model.joblib")
bundle = joblib.load(path)

pipeline = bundle["pipeline"]
features = bundle["features"]   # ['sepal_length','sepal_width','petal_length','petal_width']

# Predict a flower
row = pd.DataFrame([[5.1, 3.5, 1.4, 0.2]], columns=features)
print(pipeline.predict(row))         # -> ['setosa']
print(pipeline.predict_proba(row))   # confidence per class

πŸ“¦ What's inside model.joblib

A Python dict:

  • pipeline β€” the fitted scikit-learn Pipeline (scaler + random forest)
  • features β€” the input column names, in order
  • classes β€” the species labels

πŸ” Retrain / source code

Full training code, web app, and Docker deployment: the model was built from a CSV with StandardScaler + RandomForestClassifier.

Built for self-learning. 🌸

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support