Download distinct_server/__init__.py from User1342/distinct: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/spaces/User1342/distinct/resolve/main/distinct_server/__init__.py
- Command line
-
hf download hf://spaces/User1342/distinct/distinct_server/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/User1342/distinct/resolve/main/distinct_server/__init__.py
1.49 kB
| """Public server-core API for Distinct.""" | |
| # Before anything else, and deliberately above the other imports: importing | |
| # `distinct_server.ui` runs this file first, and `ui.py` imports gradio at its | |
| # own line 12. Gradio contacts api.gradio.app and huggingface.co when a Blocks | |
| # is constructed, so the only place this can be switched off is ahead of that | |
| # import. See distinct_protocol/telemetry.py for why it is a control here | |
| # rather than a note in the README. | |
| from distinct_protocol.telemetry import silence_third_party_telemetry | |
| silence_third_party_telemetry() | |
| from .control_plane import ControlPlane # noqa: E402 | |
| from .models import ( # noqa: E402 | |
| AgentCredential, | |
| AgentView, | |
| AuthenticationError, | |
| CapacityError, | |
| CleanupReport, | |
| ConflictError, | |
| ControlPlaneError, | |
| ControlPlaneLimits, | |
| ConversationView, | |
| DependencyError, | |
| JobView, | |
| NoCompatibleAgentError, | |
| NotFoundError, | |
| PairingCode, | |
| SessionView, | |
| ValidationError, | |
| ) | |
| from .security import canonical_request, sign_request # noqa: E402 | |
| __all__ = [ | |
| "AgentCredential", | |
| "AgentView", | |
| "AuthenticationError", | |
| "CapacityError", | |
| "CleanupReport", | |
| "ConflictError", | |
| "ControlPlane", | |
| "ControlPlaneError", | |
| "ControlPlaneLimits", | |
| "ConversationView", | |
| "DependencyError", | |
| "JobView", | |
| "NoCompatibleAgentError", | |
| "NotFoundError", | |
| "PairingCode", | |
| "SessionView", | |
| "ValidationError", | |
| "canonical_request", | |
| "sign_request", | |
| ] | |