Spaces:
Sleeping
Sleeping
Download featurelens/hf_runtime.py from ArchitSharma/FeatureLens: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/spaces/ArchitSharma/FeatureLens/resolve/main/featurelens/hf_runtime.py
- Command line
-
hf download hf://spaces/ArchitSharma/FeatureLens/featurelens/hf_runtime.py
-
curl -L -o hf_runtime.py https://huggingface.co/spaces/ArchitSharma/FeatureLens/resolve/main/featurelens/hf_runtime.py
344 Bytes
| from __future__ import annotations | |
| try: | |
| import spaces # type: ignore | |
| except ImportError: # Local development and unit tests. | |
| spaces = None | |
| def gpu(duration: int = 60): | |
| if spaces is not None and hasattr(spaces, "GPU"): | |
| return spaces.GPU(duration=duration) | |
| def decorator(fn): | |
| return fn | |
| return decorator | |