Spaces:
Sleeping
Sleeping
Download server/inputs/simulated/task_selector.py from DevastatingRPG/toolforge-env: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/DevastatingRPG/toolforge-env/resolve/main/server/inputs/simulated/task_selector.py
- Command line
-
hf download hf://spaces/DevastatingRPG/toolforge-env/server/inputs/simulated/task_selector.py
-
curl -L -o task_selector.py https://huggingface.co/spaces/DevastatingRPG/toolforge-env/resolve/main/server/inputs/simulated/task_selector.py
388 Bytes
| from typing import Dict, Any, List | |
| from server.inputs.simulated.tasks import TASKS | |
| class TaskSelector: | |
| def __init__(self): | |
| pass | |
| def next_task_list(self, task_id: str) -> Dict: | |
| match = next((item for item in TASKS if item.get("task_id") == task_id), None) | |
| if match is None: | |
| raise ValueError(f"Unknown task_id: {task_id}") | |
| return match |