Download scripts/extract_task_patterns.py from build-small-hackathon/CityQuest-AI: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/CityQuest-AI/resolve/64cf79ddd182104117c0d364caa915cda170a7cf/scripts/extract_task_patterns.py
- Command line
-
hf download hf://spaces/build-small-hackathon/CityQuest-AI@64cf79ddd182104117c0d364caa915cda170a7cf/scripts/extract_task_patterns.py
-
curl -L -o extract_task_patterns.py https://huggingface.co/spaces/build-small-hackathon/CityQuest-AI/resolve/64cf79ddd182104117c0d364caa915cda170a7cf/scripts/extract_task_patterns.py
537 Bytes
| import json | |
| with open('app/data/games_dataset.json') as f: | |
| data = json.load(f) | |
| for rec in data[:10]: | |
| i = rec['input'] | |
| o = rec['expected_output'] | |
| print(f"=== {rec['id']} ({i['game_type']}) ===") | |
| for t in o['tasks']: | |
| desc = t['description'][:90] | |
| loc = t.get('location_hint','')[:70] | |
| pts = t['points'] | |
| tm = t.get('time_limit_minutes','None') | |
| print(f" desc: {desc}") | |
| if loc: print(f" loc: {loc}") | |
| print(f" pts={pts} time={tm}") | |
| print() | |
| print("---") |