Download DoNothingAtomicFlow.py from Tachi67/DoNothingFlowModule: direct link, hf CLI and curl.
- Browser
- Download file 589 Bytes
-
https://huggingface.co/Tachi67/DoNothingFlowModule/resolve/main/DoNothingAtomicFlow.py
- Command line
-
hf download hf://Tachi67/DoNothingFlowModule/DoNothingAtomicFlow.py
-
curl -L -o DoNothingAtomicFlow.py https://huggingface.co/Tachi67/DoNothingFlowModule/resolve/main/DoNothingAtomicFlow.py
589 Bytes
| import traceback | |
| from copy import deepcopy | |
| from typing import Dict, Any | |
| from flows.base_flows import AtomicFlow | |
| class DoNothingAtomicFlow(AtomicFlow): | |
| def __init__(self, | |
| **kwargs): | |
| super().__init__(**kwargs) | |
| def instantiate_from_config(cls, config): | |
| flow_config = deepcopy(config) | |
| kwargs = {"flow_config": flow_config} | |
| # ~~~ Instantiate flow ~~~ | |
| return cls(**kwargs) | |
| def run( | |
| self, | |
| input_data: Dict[str, Any]): | |
| response = input_data.copy() | |
| return response | |