sattwik21 commited on
Commit
22d079e
·
1 Parent(s): 341860a

Tolerate missing spaces package for local dev

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,4 +1,7 @@
1
- import spaces # must be imported before any CUDA-initializing package (ZeroGPU)
 
 
 
2
 
3
  import json
4
  import os
 
1
+ try:
2
+ import spaces # noqa: E402 must precede any CUDA-initializing import (ZeroGPU)
3
+ except ImportError: # local dev without the spaces runtime
4
+ spaces = None
5
 
6
  import json
7
  import os