Spaces:
Running

File size: 331 Bytes
afb6251
 
 
 
 
 
 
1
2
3
4
5
6
7
8
"""Minimal trusted adapter example: replace predict with our model's inference."""


def predict(task, system_prompt):
    history = {r["timestamp"][:7]: r["value"] for r in task["history"]}
    return [{"id": t["id"], "forecast": history[f"{int(t['timestamp'][:4])-1}{t['timestamp'][4:7]}"]}
            for t in task["targets"]]