Spaces:
Sleeping
Sleeping
Download adsp/communication/rpc.py from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 459 Bytes
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/communication/rpc.py
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/adsp/communication/rpc.py
-
curl -L -o rpc.py https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/adsp/communication/rpc.py
459 Bytes
| """RPC client placeholder used for synchronous service-to-service calls.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from typing import Any, Callable | |
| class RPCClient: | |
| """Simple callable registry that mimics RPC semantics for local dev.""" | |
| _resolver: Callable[[str], Callable] | |
| def call(self, service: str, payload: dict) -> Any: | |
| handler = self._resolver(service) | |
| return handler(payload) | |