Spaces:
Build error
Build error
Download train_model.py from Abhi10000/AMCPREDICTAPP: direct link, hf CLI and curl.
- Browser
- Download file 263 Bytes
-
https://huggingface.co/spaces/Abhi10000/AMCPREDICTAPP/resolve/main/train_model.py
- Command line
-
hf download hf://spaces/Abhi10000/AMCPREDICTAPP/train_model.py
-
curl -L -o train_model.py https://huggingface.co/spaces/Abhi10000/AMCPREDICTAPP/resolve/main/train_model.py
263 Bytes
| import pandas as pd | |
| from sklearn.linear_model import LinearRegression | |
| from joblib import dump | |
| data = pd.read_csv("training_data.csv") | |
| X = data[["last_service_days"]] | |
| y = data["next_service_days"] | |
| model = LinearRegression().fit(X, y) | |
| dump(model, "amc_model.pkl") | |