Downloads · 30 days
4
10% of all-time downloads
DmytroSerbeniuk/my-iris-model
my-iris-model is a machine learning model from DmytroSerbeniuk. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for scikit-learn. The card lists the license as apache-2.0.
<p align="left" <a href="https://test.org/" <img src="https://img.shields.io/badge/Website-0A66C2?logo=safari&logoColor=white" style="display: inline-block; vertical-align: middle;" alt="Website" / </a <a href="https:…
Downloads · 30 days
4
10% of all-time downloads
All-time downloads
41
Public
Repo size
1.4 KB
Likes
0
Public
Click a slice to open those files.
.md2.8 KB · 41%
From the Hugging Face model README
This repository provides a lightweight logistic regression model trained on the classic Iris dataset using scikit-learn. It is ideal for educational purposes, experimentation, and demonstration of inference on tabular data.
sepal_lengthsepal_widthpetal_lengthpetal_widthsetosaversicolorvirginicaimport joblib
import pandas as pd
model = joblib.load("model.joblib")
sample = pd.DataFrame([[5.1, 3.5, 1.4, 0.2]],
columns=["sepal_length", "sepal_width", "petal_length", "petal_width"])
prediction = model.predict(sample)
print(f"🌸 Predicted class: {prediction[0]}")
from huggingface_hub import hf_hub_download
import joblib
model_path = hf_hub_download("DmytroSerbeniuk/my-iris-model", "model.joblib")
model = joblib.load(model_path)
You can also use the provided inference.py script:
python3 inference.py 6.0 2.2 4.0 1.0
Expected Output:
🌸 Predicted class: versicolor
| Sepal Length | Sepal Width | Petal Length | Petal Width | Prediction |
|---|---|---|---|---|
| 5.1 | 3.5 | 1.4 | 0.2 | setosa |
| 6.0 | 2.2 | 4.0 | 1.0 | versicolor |
| 6.9 | 3.1 | 5.4 | 2.1 | virginica |
Dependencies listed in requirements.txt:
scikit-learn
pandas
joblib
my-iris-model is licensed under the Apache 2.0 license