File size: 226 Bytes
d77ca8b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from anemoi.models import AIFS
import torch

# Load model once
model = AIFS.from_pretrained("ecmwf/aifs-single-0.2.1").to("cpu")

def run_forecast(inputs_path: str):
    outputs = model.predict(inputs_path)
    return outputs