Download example_inference.py from AL-mozahem/HRP-Stage06-Room-Rate-Prediction: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/AL-mozahem/HRP-Stage06-Room-Rate-Prediction/resolve/main/example_inference.py
- Command line
-
hf download hf://AL-mozahem/HRP-Stage06-Room-Rate-Prediction/example_inference.py
-
curl -L -o example_inference.py https://huggingface.co/AL-mozahem/HRP-Stage06-Room-Rate-Prediction/resolve/main/example_inference.py
421 Bytes
| """Educational inference demo using original saved HRP Stage06 model.""" | |
| import json | |
| from pathlib import Path | |
| from src.predict import predict_room_rate | |
| if __name__ == '__main__': | |
| examples=json.loads((Path(__file__).parent/'examples'/'sample_cases.json').read_text(encoding='utf-8')) | |
| for name, features in examples.items(): | |
| print(name, json.dumps(predict_room_rate(features),ensure_ascii=False,indent=2)) | |