ttzzs's picture
Deploy Chronos2 Forecasting API v3.0.0 with new SOLID architecture
c40c447 verified
---
title: Chronos2 Forecasting API
emoji: πŸ“Š
colorFrom: blue
colorTo: green
sdk: docker
app_file: Dockerfile.spaces
app_port: 7860
---
# Chronos2 Excel Forecasting API
Time series forecasting API powered by Amazon Chronos-2 model with Excel Add-in support.
## Features
- βœ… **Univariate & Multivariate Forecasting** - Multiple time series support
- βœ… **Anomaly Detection** - Detect outliers in your data
- βœ… **Backtesting** - Validate forecast accuracy
- βœ… **Excel Add-in** - Direct integration with Microsoft Excel
- βœ… **Interactive Charts** - Visualize forecasts and anomalies
- βœ… **REST API** - Easy integration with any platform
## Quick Start
### API Endpoints
- **Health Check**: `GET /health`
- **Documentation**: `GET /docs`
- **Univariate Forecast**: `POST /forecast/univariate`
- **Multivariate Forecast**: `POST /forecast/multivariate`
- **Anomaly Detection**: `POST /forecast/anomaly`
- **Backtesting**: `POST /forecast/backtest`
### Excel Add-in
Load the add-in in Excel:
1. Insert β†’ Add-ins β†’ Upload My Add-in
2. Paste URL: `https://ttzzs-chronos2-excel-forecasting-api.hf.space/manifest.xml`
### Example API Call
```bash
curl -X POST https://ttzzs-chronos2-excel-forecasting-api.hf.space/forecast/univariate \
-H "Content-Type: application/json" \
-d '{
"values": [100, 102, 105, 108, 110],
"prediction_length": 3,
"model_id": "amazon/chronos-2"
}'
```
## Architecture
Built with Clean Architecture principles:
- **Domain Layer** - Business logic and entities
- **Application Layer** - Use cases and services
- **Infrastructure Layer** - External dependencies (ML models, storage)
- **API Layer** - FastAPI routes and DTOs
## Technology Stack
- **Framework**: FastAPI 0.115.5
- **ML Model**: Amazon Chronos-2 (Transformer-based forecasting)
- **Python**: 3.10+
- **Docker**: Optimized multi-stage build
## License
MIT License
## Support
For issues and questions, visit the [GitHub repository](https://github.com/vargasjosej/aprender_ai/tree/refactor/solid-architecture/chronos2-server).