CoolFace
Apppublic

ananttripathiak/SuperKart_AKT

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

SuperKart Sales Forecasting API

This is a machine learning API for predicting sales revenue of products in SuperKart retail stores.

Features

  • —Single Prediction: Predict sales for a single product-store combination
  • —Batch Prediction: Predict sales for multiple product-store combinations
  • —Health Check: Monitor API status

API Endpoints

  • —GET / - API information and available endpoints
  • —GET /health - Health check
  • —POST /predict - Single prediction
  • —POST /batch_predict - Batch predictions

Usage

Single Prediction

bash
curl -X POST http://localhost:5000/predict \
  -H "Content-Type: application/json" \
  -d '{
    "Product_Weight": 12.5,
    "Product_Sugar_Content": "Low Sugar",
    "Product_Allocated_Area": 0.05,
    "Product_Type": "Frozen Foods",
    "Product_MRP": 100.0,
    "Store_Establishment_Year": 2010,
    "Store_Size": "Medium",
    "Store_Location_City_Type": "Tier 1",
    "Store_Type": "Supermarket Type1"
  }'

Batch Prediction

bash
curl -X POST http://localhost:5000/batch_predict \
  -H "Content-Type: application/json" \
  -d '{
    "data": [
      {
        "Product_Weight": 12.5,
        "Product_Sugar_Content": "Low Sugar",
        "Product_Allocated_Area": 0.05,
        "Product_Type": "Frozen Foods",
        "Product_MRP": 100.0,
        "Store_Establishment_Year": 2010,
        "Store_Size": "Medium",
        "Store_Location_City_Type": "Tier 1",
        "Store_Type": "Supermarket Type1"
      }
    ]
  }'

Model Information

The model uses ensemble learning techniques including Random Forest, XGBoost, and Gradient Boosting to predict sales revenue based on product and store characteristics.