Download executors/factory.py from EtashGuha/CodeLATS: direct link, hf CLI and curl.
- Browser
- Download file 265 Bytes
-
https://huggingface.co/spaces/EtashGuha/CodeLATS/resolve/main/executors/factory.py
- Command line
-
hf download hf://spaces/EtashGuha/CodeLATS/executors/factory.py
-
curl -L -o factory.py https://huggingface.co/spaces/EtashGuha/CodeLATS/resolve/main/executors/factory.py
265 Bytes
| from .py_executor import PyExecutor | |
| from .executor_types import Executor | |
| def executor_factory(lang: str) -> Executor: | |
| if lang == "py" or lang == "python": | |
| return PyExecutor() | |
| else: | |
| raise ValueError(f"Invalid language for executor: {lang}") | |