Spaces:
Running on Zero
Running on Zero
File size: 485 Bytes
7f9dfed | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from __future__ import annotations
from collections.abc import Callable
from importlib import import_module
from types import SimpleNamespace
from typing import Any, TypeVar
F = TypeVar("F", bound=Callable[..., Any])
spaces: Any
try:
spaces = import_module("spaces")
except ImportError:
def _gpu(*_args: Any, **_kwargs: Any) -> Callable[[F], F]:
def decorator(func: F) -> F:
return func
return decorator
spaces = SimpleNamespace(GPU=_gpu)
|