File size: 2,057 Bytes
36a7e49
c40c447
69b5a3f
36a7e49
69b5a3f
36a7e49
c40c447
69b5a3f
36a7e49
 
c40c447
69b5a3f
c40c447
69b5a3f
c40c447
69b5a3f
c40c447
 
 
 
 
 
69b5a3f
c40c447
69b5a3f
c40c447
69b5a3f
c40c447
 
 
 
 
 
69b5a3f
c40c447
69b5a3f
c40c447
 
 
69b5a3f
c40c447
69b5a3f
 
c40c447
69b5a3f
 
c40c447
 
 
69b5a3f
 
 
c40c447
69b5a3f
c40c447
 
 
 
 
69b5a3f
c40c447
69b5a3f
c40c447
 
 
 
69b5a3f
c40c447
69b5a3f
c40c447
69b5a3f
c40c447
69b5a3f
c40c447
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
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).