Download example_inference.py from AL-mozahem/HRP-Stage01-Booking-Cancellation-Risk: direct link, hf CLI and curl.
- Browser
- Download file 395 Bytes
-
https://huggingface.co/AL-mozahem/HRP-Stage01-Booking-Cancellation-Risk/resolve/main/example_inference.py
- Command line
-
hf download hf://AL-mozahem/HRP-Stage01-Booking-Cancellation-Risk/example_inference.py
-
curl -L -o example_inference.py https://huggingface.co/AL-mozahem/HRP-Stage01-Booking-Cancellation-Risk/resolve/main/example_inference.py
395 Bytes
| """Run saved Stage 01 LDA model on the provided synthetic example.""" | |
| from pathlib import Path | |
| import json | |
| from src.predict import predict_cancellation | |
| sample = json.loads((Path(__file__).resolve().parent / 'integration' / 'request_example.json').read_text(encoding='utf-8')) | |
| result = predict_cancellation(sample.get('features', sample)) | |
| print(json.dumps(result, indent=2, ensure_ascii=False)) | |