Spaces:
Sleeping

superkart-api / README.md
Metatron2030's picture
deploy superkart-sales-v1.0 (test RMSE 274.21)
4362ba2 verified
|
Raw History Blame Contribute Delete
1.07 kB
---
title: SuperKart Sales Forecast API
emoji: 🛒
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
license: mit
---
# SuperKart Sales Forecast API
Predicts `Product_Store_Sales_Total` for a product-store pair.
| Method | Path | Purpose |
|--------|------|---------|
| GET | `/` | Service card and route list |
| GET | `/health` | Liveness probe |
| GET | `/ready` | 503 until the golden-sample check passes |
| GET | `/v1/model-info` | Version, metrics, expected schema |
| POST | `/v1/predict` | Single object or array (max 500) |
**Model:** RandomForestRegressor · test RMSE 274.21 · test R2 0.9328
```bash
curl -X POST https://<space>.hf.space/v1/predict \
-H "Content-Type: application/json" \
-d '{"Product_Id":"FD1234","Product_Weight":12.5,
"Product_Sugar_Content":"Regular","Product_Allocated_Area":0.05,
"Product_Type":"Dairy","Product_MRP":150.0,"Store_Id":"OUT004",
"Store_Establishment_Year":2009,"Store_Size":"Medium",
"Store_Location_City_Type":"Tier 2","Store_Type":"Supermarket Type2"}'
```