Instructions to use getSTEAV/system-one-games with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use getSTEAV/system-one-games with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 682 Bytes
9220532 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """Score a released example: python examples/quickstart.py --game snake."""
import argparse
import json
from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from system_one_games import GameModel
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--game", choices=["dino", "snake", "tetris"], default="snake")
parser.add_argument("--device", default=None)
args = parser.parse_args()
row = json.loads((ROOT / args.game / "example.json").read_text())
model = GameModel.from_pretrained(ROOT, game=args.game, device=args.device)
print(json.dumps(model.predict(row["state"], row["question"]), indent=2))
|