Spaces:
Running
Running
Upload service.py
Browse files- service.py +8 -9
service.py
CHANGED
|
@@ -101,15 +101,14 @@ class MoiraiService:
|
|
| 101 |
assert self._module is not None
|
| 102 |
|
| 103 |
prediction_length = self.max_horizon_step
|
| 104 |
-
model = self._Moirai2Forecast(
|
| 105 |
-
module=self._module,
|
| 106 |
-
prediction_length=prediction_length,
|
| 107 |
-
context_length=min(self.max_context_length, len(close_prices)),
|
| 108 |
-
target_dim=1,
|
| 109 |
-
feat_dynamic_real_dim=0,
|
| 110 |
-
past_feat_dynamic_real_dim=0,
|
| 111 |
-
|
| 112 |
-
)
|
| 113 |
predictor = model.create_predictor(batch_size=1)
|
| 114 |
dataset = self._ListDataset(
|
| 115 |
[
|
|
|
|
| 101 |
assert self._module is not None
|
| 102 |
|
| 103 |
prediction_length = self.max_horizon_step
|
| 104 |
+
model = self._Moirai2Forecast(
|
| 105 |
+
module=self._module,
|
| 106 |
+
prediction_length=prediction_length,
|
| 107 |
+
context_length=min(self.max_context_length, len(close_prices)),
|
| 108 |
+
target_dim=1,
|
| 109 |
+
feat_dynamic_real_dim=0,
|
| 110 |
+
past_feat_dynamic_real_dim=0,
|
| 111 |
+
)
|
|
|
|
| 112 |
predictor = model.create_predictor(batch_size=1)
|
| 113 |
dataset = self._ListDataset(
|
| 114 |
[
|