Spaces:
Sleeping
Sleeping
add ZeroGPU warmup function
Browse files
app.py
CHANGED
|
@@ -4,6 +4,15 @@ import sys
|
|
| 4 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))
|
| 5 |
sys.path.insert(0, os.path.dirname(__file__))
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
from roicropper.web import demo, launch
|
| 8 |
|
| 9 |
if __name__ == "__main__":
|
|
|
|
| 4 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))
|
| 5 |
sys.path.insert(0, os.path.dirname(__file__))
|
| 6 |
|
| 7 |
+
try:
|
| 8 |
+
import spaces
|
| 9 |
+
|
| 10 |
+
@spaces.GPU
|
| 11 |
+
def _roicropper_gpu_warmup():
|
| 12 |
+
return None
|
| 13 |
+
except ImportError:
|
| 14 |
+
pass
|
| 15 |
+
|
| 16 |
from roicropper.web import demo, launch
|
| 17 |
|
| 18 |
if __name__ == "__main__":
|