Spaces:
Sleeping
Sleeping
metadata
title: Hotel Booking Cancellation Prediction API
emoji: 🏨
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: mit
Hotel Booking Cancellation Prediction API
This is a FastAPI-based prediction service that estimates the probability of hotel booking cancellations.
Features
- POST /predict - Predict cancellation probability for a single booking
- GET /health - Health check endpoint
- GET / - API information
Example Usage
import requests
payload = {
"lead_time": 30,
"arrival_month": 7,
"adults": 2,
"children": 0,
"adr": 120.0
}
response = requests.post("https://huggingface.co/spaces/j2damax/boking-cancelation-api/predict", json=payload)
print(response.json())
Model Information
The API uses a machine learning model trained on hotel booking data with features like:
- Lead time (days before arrival)
- Guest composition (adults, children)
- Pricing (average daily rate)
- Stay duration
- And more...
Check /docs for the interactive API documentation.