SegMatch / spaces.py
skallewag's picture
Upload 25 files
62cc23b verified
raw
history blame
317 Bytes
import functools
import os
def GPU(func):
"""
A decorator to indicate that a function should use GPU acceleration if available.
This is used specifically for Hugging Face Spaces.
"""
@functools.wraps(func)
def wrapper(*args, **kwargs):
return func(*args, **kwargs)
return wrapper