open-to-work-musical / src /__init__.py
Tanya-Khanna
Day 1 skeleton: full Gradio UI, resume parsing, stubbed AI pipeline
82f1f84
Raw
History Blame Contribute Delete
401 Bytes
# ZeroGPU shim: on a HF ZeroGPU Space, `spaces` is available and GPU-stage
# functions must be decorated with @GPU. Locally it falls back to a no-op,
# so the same code runs on the laptop and on the Space.
try:
import spaces
GPU = spaces.GPU
except ImportError: # local dev, no ZeroGPU
def GPU(fn=None, **kwargs):
if fn is None:
return lambda f: f
return fn