abhaypratapsingh111's picture
Upload folder using huggingface_hub
fc813d5 verified
"""
Application constants for Chronos 2 Forecasting App
"""
# Chronos-2 Model from https://huggingface.co/papers/2510.15821
# The official Chronos-2 model with group attention mechanism
# Supports: univariate, multivariate, and covariate-informed forecasting
CHRONOS2_MODEL = 's3://autogluon/chronos-2'
# Forecast horizons with labels
FORECAST_HORIZONS = {
'1D': 1,
'1W': 7,
'1M': 30,
'3M': 90,
'6M': 180,
'1Y': 365
}
# Confidence levels
CONFIDENCE_LEVELS = [80, 90, 95, 99]
# File upload settings
MAX_FILE_SIZE = 100 * 1024 * 1024 # 100MB
ALLOWED_EXTENSIONS = ['csv', 'xlsx', 'xls']
# Data processing settings
MAX_MISSING_PERCENT = 10
MIN_DATA_POINTS_MULTIPLIER = 2
MAX_CHART_POINTS = 10000
MAX_PREDICTION_HISTORY = 10
# UI colors
COLORS = {
'primary': '#0066CC',
'secondary': '#5C6BC0',
'success': '#4CAF50',
'warning': '#FF9800',
'danger': '#F44336',
'info': '#2196F3',
'historical': '#0066CC',
'forecast': '#FFD700',
'separator': '#999999',
'confidence': {
80: 'rgba(255, 215, 0, 0.4)',
90: 'rgba(255, 215, 0, 0.3)',
95: 'rgba(255, 215, 0, 0.2)',
99: 'rgba(255, 215, 0, 0.1)'
}
}
# Chart configuration
CHART_CONFIG = {
'displayModeBar': True,
'displaylogo': False,
'modeBarButtonsToRemove': ['lasso2d', 'select2d'],
'toImageButtonOptions': {
'format': 'png',
'filename': 'chronos_forecast',
'height': 800,
'width': 1200,
'scale': 2
}
}
# Performance settings
DEBOUNCE_DELAY = 500 # milliseconds
LARGE_DATASET_THRESHOLD = 100000
# Date format patterns to try
DATE_FORMATS = [
'%Y-%m-%d',
'%Y/%m/%d',
'%d-%m-%Y',
'%d/%m/%Y',
'%m-%d-%Y',
'%m/%d/%Y',
'%Y-%m-%d %H:%M:%S',
'%Y/%m/%d %H:%M:%S',
'%d-%m-%Y %H:%M:%S',
'%d/%m/%Y %H:%M:%S'
]