Spaces:
Running
Running
Download train.py from wihaha/worldcup-api: direct link, hf CLI and curl.
- Browser
- Download file 469 Bytes
-
https://huggingface.co/spaces/wihaha/worldcup-api/resolve/main/train.py
- Command line
-
hf download hf://spaces/wihaha/worldcup-api/train.py
-
curl -L -o train.py https://huggingface.co/spaces/wihaha/worldcup-api/resolve/main/train.py
469 Bytes
| import os | |
| import joblib | |
| from rule_based_model import RuleBasedModel | |
| def train_baseline_model(): | |
| print("Initializing Rule-Based Baseline Model (avoiding time leakage from current matches)...") | |
| clf = RuleBasedModel() | |
| # 6. Save Model | |
| os.makedirs('artifacts', exist_ok=True) | |
| joblib.dump(clf, 'artifacts/rule_based_baseline.pkl') | |
| print("Model saved to artifacts/rule_based_baseline.pkl") | |
| if __name__ == "__main__": | |
| train_baseline_model() | |