File size: 270 Bytes
627d3d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 给huggingface space写的兼容代码

try:
    import spaces

    is_spaces_env = True
except:

    class NoneSpaces:
        def __init__(self):
            pass

        def GPU(self, fn):
            return fn

    spaces = NoneSpaces()
    is_spaces_env = False