|
Download README.md from unnicr/iris-classifier: direct link, hf CLI and curl.
- Browser
- Download file 847 Bytes
-
https://huggingface.co/unnicr/iris-classifier/resolve/main/README.md
- Command line
-
hf download hf://unnicr/iris-classifier/README.md
-
curl -L -o README.md https://huggingface.co/unnicr/iris-classifier/resolve/main/README.md
847 Bytes
| title: Iris Flower Classifier | |
| emoji: 🌸 | |
| colorFrom: purple | |
| colorTo: pink | |
| sdk: gradio | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # Iris Flower Classifier | |
| A Random Forest model (scikit-learn) that predicts the species of an iris flower | |
| (setosa, versicolor, virginica) from four measurements in centimetres: | |
| sepal length, sepal width, petal length and petal width. | |
| - **Training data:** the classic Iris dataset (150 samples, 3 classes) | |
| - **Algorithm:** RandomForestClassifier, 100 trees | |
| - **Test accuracy:** 90% on a 20% hold-out split | |
| ## Use it in Python | |
| ```python | |
| import joblib | |
| from huggingface_hub import hf_hub_download | |
| bundle = joblib.load(hf_hub_download("your-username/iris-classifier", "model.joblib")) | |
| model, classes = bundle["model"], bundle["classes"] | |
| print(classes[model.predict([[5.1, 3.5, 1.4, 0.2]])[0]]) # setosa | |
| ``` | |