Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -215,7 +215,7 @@ def predict_technical_indicators_future(data: pd.DataFrame, price_prediction: np
|
|
| 215 |
def predict_prices(data, prediction_days=30):
|
| 216 |
"""Fungsi prediksi utama menggunakan Chronos-2 dengan enhanced covariates."""
|
| 217 |
|
| 218 |
-
# Default return structure for errors (
|
| 219 |
empty_result = {
|
| 220 |
'values': np.array([]), 'dates': pd.Series([], dtype='datetime64[ns]'),
|
| 221 |
'high_30d': 0, 'low_30d': 0, 'mean_30d': 0, 'change_pct': 0,
|
|
|
|
| 215 |
def predict_prices(data, prediction_days=30):
|
| 216 |
"""Fungsi prediksi utama menggunakan Chronos-2 dengan enhanced covariates."""
|
| 217 |
|
| 218 |
+
# Default return structure for errors (Menggunakan np.array([]) yang aman)
|
| 219 |
empty_result = {
|
| 220 |
'values': np.array([]), 'dates': pd.Series([], dtype='datetime64[ns]'),
|
| 221 |
'high_30d': 0, 'low_30d': 0, 'mean_30d': 0, 'change_pct': 0,
|