nightey3s commited on
Commit
29a8232
·
unverified ·
1 Parent(s): 8cf5bd1

Fix compatability for ZeroGPU

Browse files
Files changed (1) hide show
  1. profanity_detector.py +2 -0
profanity_detector.py CHANGED
@@ -26,6 +26,8 @@ logger = logging.getLogger('profanity_detector')
26
 
27
  # Detect if we're running in a ZeroGPU environment
28
  IS_ZEROGPU = os.environ.get("SPACE_RUNTIME_STATELESS", "0") == "1"
 
 
29
 
30
  # Define device strategy that works in both environments
31
  if IS_ZEROGPU:
 
26
 
27
  # Detect if we're running in a ZeroGPU environment
28
  IS_ZEROGPU = os.environ.get("SPACE_RUNTIME_STATELESS", "0") == "1"
29
+ if os.environ.get("SPACES_ZERO_GPU") is not None:
30
+ IS_ZEROGPU = True
31
 
32
  # Define device strategy that works in both environments
33
  if IS_ZEROGPU: