Spaces:
No application file
No application file
metadata
title: Castor Price Forecast API
emoji: 📈
colorFrom: green
colorTo: blue
sdk: docker
pinned: false
app_port: 7860
Castor Price Forecasting API
This is a Flask-based API for forecasting Castor oilseed prices using ARIMA and LSTM models.
Features
- ARIMA Model: Statistical forecasting for stable trends.
- LSTM Model: Deep learning model for complex pattern recognition.
- API Key Authentication: Secure access via
X-API-Keyheader. - Interactive Documentation: Clear endpoints for forecasting and health checks.
Usage
Health Check
curl https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME/api/health
Get Forecast
curl -X POST https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME/api/forecast \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product": "Castor",
"start_date": "2025-12-01",
"end_date": "2026-01-31"
}'
Local Development
Install dependencies:
pip install -r requirements.txtRun the app:
python app.py