ojas / README.md
AgentCrafter's picture
Update README.md
a96b4d7 verified
|
Raw
History Blame Contribute Delete
1.1 kB
---
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-Key` header.
- **Interactive Documentation**: Clear endpoints for forecasting and health checks.
## Usage
### Health Check
```bash
curl https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME/api/health
```
### Get Forecast
```bash
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
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run the app:
```bash
python app.py
```