Spaces:
Configuration error
Configuration error
Download train.py from ariefrahmansyah/iris-classifier: direct link, hf CLI and curl.
- Browser
- Download file 319 Bytes
-
https://huggingface.co/spaces/ariefrahmansyah/iris-classifier/resolve/main/train.py
- Command line
-
hf download hf://spaces/ariefrahmansyah/iris-classifier/train.py
-
curl -L -o train.py https://huggingface.co/spaces/ariefrahmansyah/iris-classifier/resolve/main/train.py
319 Bytes
| from pickle import dump | |
| from sklearn import datasets | |
| from sklearn.linear_model import LogisticRegression | |
| # import some data to play with | |
| iris = datasets.load_iris() | |
| X = iris.data | |
| Y = iris.target | |
| logreg = LogisticRegression(C=1e5) | |
| logreg.fit(X, Y) | |
| with open("model.pkl", "wb") as f: | |
| dump(logreg, f, protocol=5) | |