Spaces:
Running
Running
Download server/inputs/simulated/task_selector.py from Hugging-coder14/toolforge-env: direct link, hf CLI and curl.
- Browser
- Download file 400 Bytes
-
https://huggingface.co/spaces/Hugging-coder14/toolforge-env/resolve/46b3240f1540d8026dffd05b245d22638f0930b2/server/inputs/simulated/task_selector.py
- Command line
-
hf download hf://spaces/Hugging-coder14/toolforge-env@46b3240f1540d8026dffd05b245d22638f0930b2/server/inputs/simulated/task_selector.py
-
curl -L -o task_selector.py https://huggingface.co/spaces/Hugging-coder14/toolforge-env/resolve/46b3240f1540d8026dffd05b245d22638f0930b2/server/inputs/simulated/task_selector.py
400 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 |