FeatureLens / featurelens /hf_runtime.py
ArchitSharma's picture
Initial FeatureLens v0.1.0
9d24374
Raw
History Blame Contribute Delete
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