Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
C2MV/RECIEN_NACIDOS_PERU_2024
C2MV
/
PROYECTO_2024
like
1
Sleeping
App
Files
Files
Community
bc829c9
PROYECTO_2024
/
decorators.py
C2MV
Create decorators.py
209bb28
verified
3 months ago
raw
Copy download link
history
blame
Safe
252 Bytes
# decorators.py
import
spaces
def
gpu_decorator
(
duration=
100
):
def
decorator
(
func
):
@spaces.GPU(
duration=duration
)
def
wrapper
(
*args, **kwargs
):
return
func(*args, **kwargs)
return
wrapper
return
decorator