--- title: Test emoji: 🦖 colorFrom: green colorTo: blue sdk: docker app_port: 7860 --- # TiRex – Zero‑Shot Time Series Forecasting App A Gradio‑based interactive web app to perform zero‑shot time series forecasting using the TiRex model. Upload your own CSV/XLSX/Parquet files or choose from built‑in presets, filter series by name, and visualize quantile forecasts over your chosen horizon. --- ## 🔍 Features - **Zero‑Shot Forecasting**: Powered by the [`NX-AI/TiRex`](https://huggingface.co/NX-AI/TiRex) model. - **Custom Data Upload**: Accepts CSV, XLSX, and Parquet. - **Preset Datasets**: Includes `loop.csv`, `air_passangers.csv`, and `ett2.csv` for quick demos. - **Interactive Filtering**: Search, check/uncheck, and plot only the series you care about. - **Quantile Forecasts**: Displays historical data, median forecast line, and 10–90% quantile shading. - **Configurable Horizon**: Slider to set forecast length (1–512 steps). - **Automatic Defaults**: Detects best forecast‐length defaults for presets. --- ## 📊 Data Format ### With Named Series ```csv AAPL,120.5,121.0,119.8,122.1,123.5,... AMZN,3300.0,3310.5,3295.2,3305.8,3315.1,... GOOGL,2800.1,2795.3,2810.7,2805.2,2820.4,... ``` ### Without Named Series ```csv 120.5,121.0,119.8,122.1,123.5,... 3300.0,3310.5,3295.2,3305.8,3315.1,... 2800.1,2795.3,2810.7,2805.2,2820.4,... ``` ### Key Rules: - **One row per time series** - **Consistent naming**: Either all rows have names (first column) or none do - **Numeric data**: All values after the optional name column must be numeric - **Minimum length**: Time series must have at least `forecast_length + 10` data points - **Maximum constraints**: Up to 30 time series and 2048 time steps per series ## 🔧 Configuration ### Forecast Length - **Default**: 64 steps - **Range**: 1-512 steps - **Auto-adjustment**: Preset datasets have optimized forecast lengths: - `loop.csv` and `ett2.csv`: 256 steps - `air_passangers.csv`: 48 steps ### Model Settings - **Device**: CUDA (T4 GPU) - **Quantiles**: 10%, 50% (median), 90% prediction intervals ## 📈 Output Features - **Historical data**: Blue line showing input time series - **Median forecast**: Orange line for point predictions - **Uncertainty bands**: Gray shaded area showing 10%-90%