Update README.md
Browse files
README.md
CHANGED
|
@@ -16,11 +16,11 @@ You can find more details about the model on [GitHub page](https://github.com/an
|
|
| 16 |
## 🚀 Quick Start
|
| 17 |
```python
|
| 18 |
import torch
|
| 19 |
-
from transformers import
|
| 20 |
|
| 21 |
# Load pre-trained model (when available)
|
| 22 |
-
model =
|
| 23 |
-
'ant-intl/Falcon-TST_Large',
|
| 24 |
trust_remote_code=True
|
| 25 |
)
|
| 26 |
|
|
@@ -32,8 +32,9 @@ time_series = torch.randn(batch_size, lookback_length, channels)
|
|
| 32 |
device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
|
| 33 |
model = model.to(device)
|
| 34 |
time_series = time_series.to(device)
|
|
|
|
| 35 |
|
| 36 |
# Generate forecasts
|
| 37 |
forecast_length = 96
|
| 38 |
-
predictions = model.
|
| 39 |
```
|
|
|
|
| 16 |
## 🚀 Quick Start
|
| 17 |
```python
|
| 18 |
import torch
|
| 19 |
+
from transformers import AutoModel
|
| 20 |
|
| 21 |
# Load pre-trained model (when available)
|
| 22 |
+
model = AutoModel.from_pretrained(
|
| 23 |
+
'ant-intl/Falcon-TST_Large',
|
| 24 |
trust_remote_code=True
|
| 25 |
)
|
| 26 |
|
|
|
|
| 32 |
device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
|
| 33 |
model = model.to(device)
|
| 34 |
time_series = time_series.to(device)
|
| 35 |
+
print(f'device: {device}')
|
| 36 |
|
| 37 |
# Generate forecasts
|
| 38 |
forecast_length = 96
|
| 39 |
+
predictions = model.predict(time_series, forecast_horizon=forecast_length)
|
| 40 |
```
|