Spaces:
Paused
Paused
Ease the run on local
Browse files
infer.py
CHANGED
|
@@ -6,7 +6,15 @@ import tempfile
|
|
| 6 |
import numpy as np
|
| 7 |
import tqdm
|
| 8 |
import ffmpeg
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
import tqdm
|
| 8 |
import ffmpeg
|
| 9 |
+
|
| 10 |
+
try:
|
| 11 |
+
import spaces
|
| 12 |
+
except:
|
| 13 |
+
class spaces():
|
| 14 |
+
def GPU(*args, **kwargs):
|
| 15 |
+
def decorator(function):
|
| 16 |
+
return lambda *dummy_args, **dummy_kwargs: function(*dummy_args, **dummy_kwargs)
|
| 17 |
+
return decorator
|
| 18 |
|
| 19 |
|
| 20 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|