Update gradio_depth_pred.py
Browse files- gradio_depth_pred.py +2 -0
gradio_depth_pred.py
CHANGED
@@ -1,8 +1,10 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from utils import colorize
|
3 |
from PIL import Image
|
4 |
import tempfile
|
5 |
|
|
|
6 |
def predict_depth(model, image):
|
7 |
depth = model.infer_pil(image)
|
8 |
return depth
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
from utils import colorize
|
4 |
from PIL import Image
|
5 |
import tempfile
|
6 |
|
7 |
+
@spaces.GPU
|
8 |
def predict_depth(model, image):
|
9 |
depth = model.infer_pil(image)
|
10 |
return depth
|