Spaces:
Runtime error
Runtime error
Add Zero GPU Decoraters
Browse files
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
import tempfile
|
| 2 |
from pathlib import Path
|
| 3 |
|
|
@@ -66,6 +68,7 @@ def save_file(segmentation, path):
|
|
| 66 |
return path
|
| 67 |
|
| 68 |
|
|
|
|
| 69 |
def infer(image_path):
|
| 70 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
| 71 |
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
+
|
| 3 |
import tempfile
|
| 4 |
from pathlib import Path
|
| 5 |
|
|
|
|
| 68 |
return path
|
| 69 |
|
| 70 |
|
| 71 |
+
@spaces.GPU(duration=150)
|
| 72 |
def infer(image_path):
|
| 73 |
with tempfile.TemporaryDirectory() as tmpdirname:
|
| 74 |
|