File size: 317 Bytes
62cc23b |
1 2 3 4 5 6 7 8 9 10 11 12 |
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 |