Download example_inference.py from AL-mozahem/HRP-Stage07-Occupancy-Forecast: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/AL-mozahem/HRP-Stage07-Occupancy-Forecast/resolve/main/example_inference.py
- Command line
-
hf download hf://AL-mozahem/HRP-Stage07-Occupancy-Forecast/example_inference.py
-
curl -L -o example_inference.py https://huggingface.co/AL-mozahem/HRP-Stage07-Occupancy-Forecast/resolve/main/example_inference.py
382 Bytes
| import json | |
| from pathlib import Path | |
| from src.predict import predict_next7d_occupancy | |
| cases = json.loads((Path(__file__).parent / "examples/sample_cases.json").read_text(encoding="utf-8")) | |
| for name, features in cases.items(): | |
| result = predict_next7d_occupancy(features) | |
| print(name, ':', result['predicted_next_7d_occupancy_percent'], '%', '| model:', result['model_name']) | |